Source Code & Description
This online demo presents how to handle the OnError client
event of the date input to process some custom logic when the user enters
invalid input/the date is out of range.
For this case specifically we demonstrate replacing the invalid entry with a
new date/corresponding date value from an array depending on whether the
pattern is recognized as incompatible/outside of the date range bounds. The
code resides in the HandleDateParseError/HandleDateOutOfRange javascript
methods. The date is set via the SetDate(date) method from the
client-side API of the date input.