Skip to content

Error when importing DatePickerModule in the latest angular (5.0.3) #31

@zlatsic

Description

@zlatsic

I'm trying to add datetime pickers to my application, but am getting this error:
Unexpected value 'DatePickerModule' imported by the module 'AppModule'. Please add a @NgModule annotation.
It happens when I'm importing the datepicker like so:
import { DatePickerModule } from "angular-io-datepicker/src/datepicker/index";
Also, OverlayModule is imported normally.

I think this might be due to the Angular version, since this package supports v4 and I'm using v5, but would like confirmation since I only recently started using Angular. If not, I'd appreciate any advice in fixing this problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions