Filmhastasi
New Member
While I was upgrading my mvc3 project to mvc4, I met a problem about JQuery datepicker.MVC3 project is using
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\]
- jquery-1.6.3
- jquery-ui-1.8.11
- jquery-1.7.1
- jquery-ui-1.8.20