I'm having a strange problem (it didn't happen before and all of a sudden started happening) with the Kendo().TimePickerFor().
I have an ASP MVC application and I'm passing a model with start and end times to the Kendo().TimePickerFor() like this:
<div>
@Html.LabelFor(model => model.StartTime)
@(Html.Kendo().TimePickerFor(model => model.StartTime).Events(e => e.Change("startChange"));
</div>
<div>
@Html.LabelFor(model => model.EndTime)
@Html.Kendo().TimePickerFor(model => model.EndTime);
</div>
Using the chrome debugger; I get this error:
The specified value "8:00 AM" does not conform to the required format. The format is "HH:mm", "HH:mm:ss" or "HH:mm:ss.SSS" where HH is 00-23, mm is 00-59, ss is 00-59, and SSS is 000-999.
So I thought, OK, just a formatting issue. So I did this:
<div>
@Html.LabelFor(model => model.StartTime)
@(Html.Kendo().TimePickerFor(model => model.StartTime)
.Events(e => e.Change("startChange")).Format("hh:mm"));
</div>
But this changes it to military I no longer have the AM/PM option.
So I did this:
<div>
@Html.LabelFor(model => model.StartTime)
@(Html.Kendo().TimePickerFor(model => model.StartTime)
.Events(e => e.Change("startChange")).Format("hh:mm"));
</div>
and I get the original error as above on the chrome debugger:
The specified value "8:00 AM" does not conform to the required format. The format is "HH:mm", "HH:mm:ss" or "HH:mm:ss.SSS" where HH is 00-23, mm is 00-59, ss is 00-59, and SSS is 000-999.
How do I pass the date and keep the am/pm format?