-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Datepicker: "...ng-model" value must be..." on Clear action #3617
Comments
Having the same issue. Using angular 1.3.15. |
I have this problem too and have had to downgrade to an older version to support nullable dates. Any other workaround? |
Same issue with 0.13.0, but good with 0.12.1 |
I am running Angular 1.3.16, and Angular UI-Bootstrap 0.13.0, and get the same error message upon clicking 'clear' in the datepicker modal as the OP does. What makes it worse is that I am checking my forms $invalid property which is returning Also worth mentioning that if you open up Firebug while viewing the DatePicker demo at https://angular-ui.github.io/bootstrap/, it throws the error as noted by the OP. |
I have created a plunker, with documentation that describes the various problems related to this bug: http://plnkr.co/edit/Iild15cgR9NXaX0iWjti?p=preview This example aims to highlight the issue isn't just with the datepicker's model being cleared, but also how it affects form validation, even when the field is not marked as required. |
👍 Same issue here. |
+1 |
@askucher, please do not simply add |
@saurabh67, did you even read this thread? the last post in this issue specifically asks you not do what you did. you may use the response emojis to specify a reaction. in the future, please be respectful of our time and processes by not being lazy. |
It's not clear if this has been resolved. I'm still seeing the issue in Angular UI-Bootstrap 2.2.0. @icfantv When you say you've made the switch to only support JS |
=>
In console you'll see error "Datepicker directive: "ng-model" value must be a Date object, a number of milliseconds since 01.01.1970 or a string representing an RFC2822 or ISO 8601 date."
I have not expected any errors on clearing date (setting it to null).
At least in 0.12.1 I had not have any errors.
The text was updated successfully, but these errors were encountered: