Unplanned
Last Updated: 19 Jun 2020 12:58 by ADMIN
Created by: Raff
Comments: 7
Category: DateTimePickers
Type: Bug Report
0

Hi,

 

I'm having an issue with the TimePickerFor control, it doesn't show the time, only a strange format.

 

When I declare the control:

            @(Html.Kendo().TimePickerFor(m => m.ShiftStartDt)
                .Deferred()
            )

 

it only shows a forma of "h:mm tt" instead of the time from the model

 

When I change the control to a datetime picker, it works fine but I don't want to see the date, only the time.

This works:

            @(Html.Kendo().DateTimePickerFor(m => m.ShiftStartDt)
                .Deferred()
            )

 

I have debugged the model and the data is correct,

        [Display(Name = "Start Time")]
        public DateTime ShiftStartDt { get; set; }

 

I have even tried changing the model to TimeSpan but it didn't help

I tried setting the format also on the control and using jquery:

        $("#ShiftStartDt").kendoTimePicker({
            format: "HH:mm"
        });

 

still always shows "h:mm tt" always, no matter what I do

 

Regards

Raff