JQuery DatePicker not loading the year from DisplayFormat attribute.
I am using MVC 5 and JQuery 1.10 DatePicker. The view model is set to display the date as dd MMM YY format and the datepicker is set as 'd M y' . When loaded the date in the input is in the correct date format, ie. "6 Dec 15". The problem is the year on the Date picker is fixing on the first number as the year so the date picker initializes with the year 2006, not as 2015. Otherwise, the date picker is displaying in the correct date format but as the wrong year.
View Model:
[Display(Name = "USG Draft Review")]
[DisplayFormat(DataFormatString = "{0:d MMM yy}")]
[RegularExpression("^(0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01])[- /.](19|20)[0-9][0-9]$", ErrorMessage = "Invalid date")]
public DateTime? USGDraft_Review { get; set; }
View:
@Html.TextBoxFor(model => model.CNTRDraft_Submit, "{0:d}", new { id = "dtCalendarDraftSubmit2" })
The input (textbox) loads correctly in the specified format
The jQuery DatePicker however miss reads the year.