This question is locked. New answers and comments are not allowed.
Hi,
I am using a DatePicker control on my asp.net MVC 3 (Razor) view with client side validation disabled. The control has been configured with a Min and Max values.
The control seems to automatically overwrite typed in dates that are outside the allowed range, let me give an example:
Here is the control declaration:
When a user types "01/01/2015" (which is outside the allowed date range), the view model is automatically populated with the maximum allowed date (which is in this case today next year).
How can I disabled this behaviour and have my view model populated with the actual value the user typed in?
Thanks in advance.
Vincent
I am using a DatePicker control on my asp.net MVC 3 (Razor) view with client side validation disabled. The control has been configured with a Min and Max values.
The control seems to automatically overwrite typed in dates that are outside the allowed range, let me give an example:
Here is the control declaration:
Html.Telerik().DatePickerFor(m => m.SelectedEventDate)
.Name("SelectedEventDate")
.Value(Model.SelectedEventDate)
.Min(Model.CurrentApplication.MinSelectableEventDate)//10 days from today
.Max(Model.CurrentApplication.MaxEventDate)// today next year
)When a user types "01/01/2015" (which is outside the allowed date range), the view model is automatically populated with the maximum allowed date (which is in this case today next year).
How can I disabled this behaviour and have my view model populated with the actual value the user typed in?
Thanks in advance.
Vincent