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 was archived by the owner on Apr 12, 2024. It is now read-only.
expects a date and uses the date filte, else returns nothing
required set
❌
date
new Date('123456')
0NaN-NaN-NaN
^
$error.date is not set ❌
❌
I think we should always try to set the $viewValue to something. This is important if you have server-side data that may be invalid.
So number and date should not discard invalid values. If we pass garbage to the validators, the correct errors will be set.
Regarding calling toString on text-based input. I think that's okay as you will rarely set an object to a model when you know it'll be displayed in an input. But we should do "the right thing" and try to format values that are good enough, so in short:
number should not throw and call toString regardless
date should return call toString if not a Date object
date should also get the bug fixed where NaN gets output
I'll think I'll be able to throw a PR together over the weekend.