Let's say you want to use the datepicker with the custom Romanian format: dd.MM.yyyy
How can you do this without encountering jquery validation problems and misinterpreting of the date time after a postback ?
Let's say you want to use the datepicker with the custom Romanian format: dd.MM.yyyy
How can you do this without encountering jquery validation problems and misinterpreting of the date time after a postback ?
First of all include datepicker-ro.js after jquery-ui.js.
After that set the format in the model like this:
Then, in .cshtml file you can put the textboxes:
Then, also in the cshtml file, let's take care of the validation:
After that create a model binder:
Add it in Global.asax like this:
And then use it like this: