You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.
The ability to use a Date object as the model for a date input is really convenient. As documented, min/max work when given a date string but is there any particular reason why the min/max attributes couldn't support date objects as well?
This sort of thing has come up before, with regards for ng-true-value (among others) for checkboxes/etc. When using a single attribute, you don't want it to sometimes be a constant string, and sometimes a value to be parsed.
I don't necessarily think it's a problem to use a parsed value, particularly for dates, because I think it's unlikely people want to write out a constant date in their markup.
It may not be too late to change this API, I'm not sure. What do you think @tbosch, is that worthwhile? String-format dates could still be supported via min="'03/17/1988'" or something
Yeah, I think it's fine to just use strings. I only brought it up because initially I had assumed that using date objects for min/max would work. After a couple minutes of trying to figure out why my example wasn't working, it wasn't until I took a closer look at the documentation that I realized my assumption was incorrect.
The ability to use a Date object as the model for a date input is really convenient. As documented, min/max work when given a date string but is there any particular reason why the min/max attributes couldn't support date objects as well?
http://jsfiddle.net/va4kb/2/
The text was updated successfully, but these errors were encountered: