Hello,
I have a DateRangePicker set up in my Blazor app where I am
trying to improve how the user can input data in the text entry box.
Based on my testing, the text entry box in the
DateRangePicker will fire not the ValueChange event and return the dates or
string that is entered if the date is not perfectly formatted.
If the user types in the dates perfectly as “d/m/yyyy -
d/m/yyyy” complete with slashes, four-digit years, spaces, and a hyphen, then
the ValueChange event fires. Otherwise, it appears that the text entered is
discarded. This is a very poor user experience, as any slight deviation from
the format invalidates the entire entry.
My specific questions are:
- Is there some event that
fires which returns the date(s) entered in the textbox within the
DateRangePicker regardless of what is entered? That way I can do my own
validation on the entry and accept other formats. I realize we can modify the format that is required, I would like a chance to catch what the user enters and see if I can programatically format it rather then just clearing the box (Strict Mode="true")
- Is there a way to add
additional valid date formats to the textbox that will fire the
ValueChange event, such as also allowing two digit years or no spaces
around the hyphen, other separators, etc.?
Thank you,