In your sample: http://www.kendoui.com/code-library/mvc/grid/custom-popup-editor.aspx
When I want to save I get an error that the field birthdate must be a date.
I even set DataType.Date annotation on that model property. But still I get this error.
How can I fix your broken sample?
When I want to save I get an error that the field birthdate must be a date.
I even set DataType.Date annotation on that model property. But still I get this error.
How can I fix your broken sample?
4 Answers, 1 is accepted
0

Andreas
Top achievements
Rank 1
answered on 30 Mar 2015, 07:46 PM
It seems when I once set a date via datepicker then I can save and do not get an invalid modelstate.
Why is that?
Why is that?
0

Andreas
Top achievements
Rank 1
answered on 30 Mar 2015, 07:50 PM
Odd... that seemed only to work once, when I tried to submit my form again and changing the dates before still I can not submit the form as the dates are invalid...
0

Andreas
Top achievements
Rank 1
answered on 30 Mar 2015, 09:20 PM
could it be that is a culture problem?
0
Hello Andreas,
Indeed the issue seems to be caused by difference in the format and the validation. By default if you change the format of a widget the validation will still use the culture information and validate against it. Similar question here:
http://stackoverflow.com/questions/28604114/kendovalidator-causes-the-field-xxx-must-be-a-date-error-when-using-datepick
In order to tell where exactly the issue is coming from please demonstrate your case with a small demo. Thank you for the understanding.
Kind Regards,
Petur Subev
Telerik
Indeed the issue seems to be caused by difference in the format and the validation. By default if you change the format of a widget the validation will still use the culture information and validate against it. Similar question here:
http://stackoverflow.com/questions/28604114/kendovalidator-causes-the-field-xxx-must-be-a-date-error-when-using-datepick
In order to tell where exactly the issue is coming from please demonstrate your case with a small demo. Thank you for the understanding.
Kind Regards,
Petur Subev
Telerik
See What's Next in App Development. Register for TelerikNEXT.