-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Datepicker 0.13.0 - throws date error on textbox change with Angular 1.3.5 stable #3609
Comments
What is the error message you're seeing? Also, I saw that you're using minDate with a null minDate, that evaluates to a minimum date of null. You might want to remove the |
JS Error in console: |
Ah, I see. This is related to #3294 . This is a known issue, I believe we intend to break this behavior soon. When we merge in #3294, the ng-model should get |
@chrisirhc and after trying a few different date formats from the dropdown, it looks like datepicker will fail to parse any formats that end with Please look into it. Thanks |
Yes, it works only because you're in Australia. This behavior shouldn't be relied upon because it will not work, in say USA, where the locale's default date format is different from the specified date format. I think the failure to parse is actually the correct behavior as it's more expected and reliable. However, it shouldn't throw that error in the console. It should just set the ng-model to null and mark the ng-model with invalid input (only while the year is |
Hi Chris,
OR
|
You should see |
I tried to implement the new angular ui bootstrap with angular 1.3.5 stable.
Here's a plunker demo:
http://plnkr.co/edit/6jWsI4nk6hyjh2l6O5Pd?p=preview
when I change the year of second date, which is generated by
new Date()
, everything updates accordingly.But when i change the year of first date, which is generated by
new Date(1430229600000)
, it throws an error unless I manually select another date from the datepicker.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.
After selecting another date from the datepicker, it behaves like the second date with no errors.
The text was updated successfully, but these errors were encountered: