Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

Datepicker gives form error when time is a string? #4662

Closed
jwnoz opened this issue Oct 19, 2015 · 1 comment
Closed

Datepicker gives form error when time is a string? #4662

jwnoz opened this issue Oct 19, 2015 · 1 comment

Comments

@jwnoz
Copy link

jwnoz commented Oct 19, 2015

Recently updated to version 0.14.2, Datepicker always gives form error 'Date' if the model is a string

For example:
obj.time = '2015-10-09T00:00:00Z';
this would produce a form error 'Date', but this would not
obj.time = new Date('2015-10-09T00:00:00Z')

Is this working as intended that datepicker only accepts model as Date object?

I'm using angular 1.4.7

@icfantv
Copy link
Contributor

icfantv commented Oct 19, 2015

@nozshand, please do not use the issues forum for support related requests. Rather, please follow the instructions here.

Yes. If you look at the docs you will see that ng-model must be a JS Date object.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants