-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(datepicker): input validator is not called until a date is first chosen #2727
Milestone
Comments
As a workaround, I added a hackfix
|
@ShinDarth on the roadmap |
YevheniiaMazur
changed the title
Datepicker input validator is not called until a date is first chosen
fix(datepicker): input validator is not called until a date is first chosen
Jan 16, 2018
61 tasks
valorkin
added a commit
that referenced
this issue
Jan 19, 2018
5 tasks
valorkin
added a commit
that referenced
this issue
Jan 19, 2018
valorkin
added a commit
that referenced
this issue
Jan 19, 2018
valorkin
added a commit
that referenced
this issue
Jan 19, 2018
the fix worked, thanks a lot! |
nice example… Also you can refer to this new type of data picker, support both mobile and web : http://www.skptricks.com/2018/01/jquery-date-picker-with-example.html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You have a model-driven form with a field which is a Datepicker element.
If the value of this field is null by default, then the validator of the field will not be called until a date is chosen using the datepicker.
This means that if for example you just select the field, put some random characters (without selecting any date) and then walk away from then field, the validator will still not be called and then the form will be valid in any case (unless you are making that field as required).
Just to stress what I mean: the input field which uses the Datapicker should be marked as NON pristine as soon as the user enters ANY value. Currently it preserves its pristine status as the user types any character, it looses it only when a date is selected.
The text was updated successfully, but these errors were encountered: