-
Notifications
You must be signed in to change notification settings - Fork 6.7k
DatepickerPopup error when changing input field #3713
Comments
I experience same problem when I manually enter a date in the input text not using the popup. |
I have a proposed fix, if you take a look at the referenced PR above |
Great, thanks |
After upgrading from 0.14.3 to 1.1.2, I am getting "TypeError: this.activeDate.getFullYear is not a function". It seems like previous version handles both UTC string and Date object ok but 1.1.2 seems to have issue with UTC string? |
Same, I had to pass it a new Date object, the date string was throwing an error. |
It turns out that ngmodel should be JavaScript date object. Fair enough. I was maintaining dates as utc strings for sorting. |
Yes. The API was changed to require the model to be a Javascript Also, @bob-lee, it's never a bad idea to go over the CHANGELOG for each version to look for breaking changes. This was one such change, however it was made in 0.13.x and a regression was introduced that allowed strings to be used again - which was rectified in the 1.1.0 release (I believe). |
So, After the change, what's the right way to use this? [
{
name: 'bar',
date:"2016-08-28T16:00:00.000Z"
},
//......
] So, I need to for-each my response and transform |
Between server and client, date is normally transfered as string whereas datepicker requires to feed date object, so string to date (on response / page load) and date to string (on post) transforms needed. |
When changing an input field with the datepicker-popup directive (in 0.13.0), an error is thrown when the starting value is a time string ('yyyy-MM-dd').
TypeError: baseDate.getFullYear is not a function
http://plnkr.co/edit/oKNbNp07cJompsK6NBVr?p=preview
This does not occur in 0.12.1:
http://plnkr.co/edit/GFHEvBbmsgfHKK7NrYeN?p=preview
Is this a bug or am I missing something?
The text was updated successfully, but these errors were encountered: