I have an issue regarding the posting of a DateTimePicker value to a controller. Code is as follows:
There are other fields inside the viewModel which I have omitted for the sake of simplicity, but it's a really weird behavior, I'll explain:
- If I POST the form with the default value that's loaded into the DateTimePicker (DateTime.Now), it posts correctly, see screenshot "POSTDefaultValue".
- If I POST the form changing either the date or the time, it POSTS nothing, see screenshot "POSTChangeValue".
- If I remove the "Format" from the DateTimePicker, it always posts correctly, however, I need the user to see it in am/pm format, see screenshot "POSTWithoutFormat".
When the value is not POSTed, I get the error in screenshot "DateTimeError", like in case number 2.
So I'm guessing it has something to do with the format validation once the date is changed. I have set the same culture to both kendo on the client-side and on the server side using the guides you have available. Just in case, the culture I've set is "es-CR".
Any idea what could be causing this behavior ? If an example is needed I can isolate the issue and attach a project.