angular2-datetimepicker icon indicating copy to clipboard operation
angular2-datetimepicker copied to clipboard

"_co.date is undefined"

Open CybrZr00 opened this issue 7 years ago • 2 comments

Hi,

When I try to use the date picker I get the error "date is not defined" I dont use a variable named date, it seems to be something in the datepicker code.

I use the tag like so: <angular2-date-picker name="eventStart" [(ngModel)]="eventEdit.eventStart" [settings]="settings"></angular2-date-picker>

I tried it with a date variable and tried adding and removing settings but cant figure out a way around this.

The error I get is:

ERROR TypeError: _co.date is undefined Stack trace: View_DatePicker_7/<@ng:///AngularDateTimePickerModule/DatePicker.ngfactory.js:131:9 [DEBUG CODE REMOVED TO TIDY] @http://localhost:60964/dist/main-client.js?v=UCE2xjhqPU1N9R8DYZPsZJz5ET4BaupMcieEZcqsOao:175430:25 DatePicker.html:60:18

I am using webpack and AoT, with angular 4.3. Any help would be appreciated.

Thanks.

CybrZr00 avatar Feb 05 '18 02:02 CybrZr00

I can confirm that if it is not a part of a form, it works. odd.

CybrZr00 avatar Feb 05 '18 02:02 CybrZr00

Same issue :(

Edit- We just have to remove it from angular form it will work..thanks :)

poojatak avatar Feb 24 '18 10:02 poojatak