Ignore Invalid Dates #2903
RoyRosenberg
started this conversation in
General
Replies: 1 comment
-
Hi, you could subscribe to the error.td event and handle the error so the picker continues working, and either display a message or replace the value with what you're expecting the https://getdatepicker.com/6/repl.html does have an example of it |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I use [email protected]
Is there a way to ignore the input in case of parse failure?
I have an input control as date/time picker, and I want to let the user to enter not-date-strings to support macros i.e. @today, @StartOfMonth, @EndOfMonth, etc.
When I try to create the control that contains @today value
new tempusDominus.TempusDominus(e, ...);
I get the following exception:
Error: TD: Custom Date Format: Unable to parse provided input: @Today , format: L
And the control cannot be used (the picker does not open)
Can the control ignore the parse error and continue to load and be functional?
Thanks in advanced,
Roy
Beta Was this translation helpful? Give feedback.
All reactions