Open cleon26 opened 9 years ago
Yes, I've the same issue. I've tried many formats and options and still doesn't work.
Hi @cleon26 ,
I think we've got the answer. Formatting the date is in ui-date
directive, not in ui-date-format
.
Like this,
ui-date="{dateFormat:'yy-mm-dd',changeYear: true, changeMonth: true, yearRange: '1950:-0'}"
same problem in one old project
I believe it parses these if there is no date format, however it's safest to use a Date in the model. So new Date("2014-08-20T00:00:00-04:00") will work to parse your iso date.
the problem is that even example
<input ui-date ui-date-format="DD, d MM, yy" ng-model="myDate">
where directive ui-date-format doesn't work, but maybe it is only on angular v1.5, because I didn't test this with previous versions
My dates are coming back from the server as strings formatted like this: "2014-08-20T00:00:00-04:00"
What is the trick for making this work with the date picker? I've tried several variations of ui-date-format without success. I get different errors about being unable to parse the string.