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 May 28, 2019. It is now read-only.
Version: 1.1.1
Enter a date into a field such as 11/4/2016 and tab away or otherwise blur the control. Then edit it again and enter something like 1/1, something that isn't a valid date on its own. Rather than change to 1/1/2016 or today's date, the 1/1 remains, the input loses focus and the calendar dropdown still remains visible. This leads to an invalid date being submitted in the form but I cannot seem to get validation to show it as invalid. This leads to null reaching my controller instead of a date.
Expectation
I would expect the same behavior as tabbing or clicking away; the value would be validated and either turned into a valid date or a validation error appearing.
Reproduce
Just go to the ui-date demo page and repeat the steps. It exhibits the problem.
In the very first datepicker on that screen, enter 1.1 and hit enter.
Suspicions
I've poked through the code a bit and I think this has something to do with how the onSelect operates when enter is hit. It should probably be calling setDate on the datepicker and not just setViewValue which doesn't appear to be working.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Problem
Version: 1.1.1
Enter a date into a field such as
11/4/2016
and tab away or otherwise blur the control. Then edit it again and enter something like1/1
, something that isn't a valid date on its own. Rather than change to1/1/2016
or today's date, the1/1
remains, the input loses focus and the calendar dropdown still remains visible. This leads to an invalid date being submitted in the form but I cannot seem to get validation to show it as invalid. This leads to null reaching my controller instead of a date.Expectation
I would expect the same behavior as tabbing or clicking away; the value would be validated and either turned into a valid date or a validation error appearing.
Reproduce
Just go to the
ui-date
demo page and repeat the steps. It exhibits the problem.https://angular-ui.github.io/ui-date/
In the very first datepicker on that screen, enter
1.1
and hit enter.Suspicions
I've poked through the code a bit and I think this has something to do with how the onSelect operates when enter is hit. It should probably be calling
setDate
on the datepicker and not justsetViewValue
which doesn't appear to be working.The text was updated successfully, but these errors were encountered: