Probably this part:
{ dateFormat: "dd/mm/yy" }
This is not the default, since .NET shows the date, so jQuery may not understand it. You must make sure that the day is up to a month and the year is 2 digits.
Edit: After reading your edit about a control error, when the day is more than 12, this definitely causes this. However, the problems that I mentioned below may still cause problems after you set the date format.
Other potential problems:
You set the readonly HTML attribute, and I don't know why you will do this:
@readonly = true
This will either do nothing or suppress the datepicker popup.
Finally, I notice that you manually determine the name and identifier:
id = Model.Name, name = Model.Name
What is the editor for Model.Value , so why do you connect it to Model.Name ? Does anything else on your page have the same identifier? Does another form field have the same name? If so, it can damage things on both the client and the server. You do not even need to specify them; helper method MVC can do this for you.
What to do:
First of all, annotate your ViewModel, as some suggested, but make sure the format is right:
[UIHint("DateTime")] [DataType(DataType.Date)] [DisplayFormat(DataFormatString = "{0:dd/mm/yy}", ApplyFormatInEditMode = true)] public DateTime? Value { get; set; }
This should fix this, but also consider removing the id , name and readonly attributes from your Razor code completely.
If you are using HTML5, one thing that may help is to use EditorFor instead of TextBoxFor . This should make it use the HTML5 DateTime input type. jQuery-UI should not have any problems processing the TextBox, but it cannot hurt.
@Html.EditorFor(x => x.Value, new { @class = "date" })