I have a date field hooked up to a jQueryUI DatePicker calendar.
This DatePicker has min and max dates, though the user can still type dates outside of this range into the text field. I have server-side validation to catch these cases that returns an error message to the user and prevents them from advancing.
My problem is that when the form loads again after incorrect input, and tries to display the data already entered, the DatePicker replaces the invalid date with the closest valid date.
For example, entering a date before the min date returns the form with an error and the min date entered in the field.
Is there any way to prevent the date picker from changing this value?