Kendo Datepicker format not changing

2.4k views Asked by At

I've got a Kendo Datepicker which displays as dd/MM/yyyy, which is fair enough. However, I'm wanting to change it to MM/dd/yyyy but whenever I do (by changing format in the below), it either remains at dd/MM/yyyy or becomes blank:

<input name="saleDate" id="txt-saleDate" data-bind="kendoDatePicker: { value: saleDate, format: 'MM/dd/yyyy', enabled: $parent.isNewSales }" />

Tried changing the format to 'MM/dd/yyyy' (as above) and also 'yyyy/MM/dd' but none of these have worked. Also tried using parseFormats.

2

There are 2 answers

0
Okz On
$("#txt-saleDate").kendoDatePicker({
    dateInput: true,
    format: "dd/MM/yyyy"
});
1
eugene.sushilnikov On

I had the same issue and format: "{0:yyyy-MM-dd}" code satisfied me. I hope this helps you.