while asp.net mvc4 upgrading jquery datepicker error

Filmhastasi

New Member
While I was upgrading my mvc3 project to mvc4, I met a problem about JQuery datepicker.MVC3 project is using
  • jquery-1.6.3
  • jquery-ui-1.8.11
MVC4 project is using
  • jquery-1.7.1
  • jquery-ui-1.8.20
JQuery datepicker is working on mVC3 but an error occuring on mvc4.
mbUSP.png
My Model is this\[code\]public class Reservation{ public string Name { get; set; } public DateTime? Date { get; set; }}\[/code\]And my EditorTemplate is here.\[code\]model DateTime?Html.TextBox("", Model.HasValue ? Model.Value.ToShortDateString() : string.Empty, new { data_datepicker = true })\[/code\]I applied the data attributes in model like this but not worked.\[code\] [DataType(DataType.Date)] [DisplayFormat(DataFormatString = "{0:dd.mm.yyyy}")] public DateTime? Date { get; set; }\[/code\]
 
Back
Top