4
votes

i want to set the kendo ui DateTimePicker to value with : "dd/MM/yyyy hh:mm:ss" (notice the order of dd & MM).

when i create the datetimepicker the firmat is :"dd/MM/yyyy hh:mm:ss" and the value is new Date(xxxx)

when xxxx is "23/11/2013 09:15:30" nothing is presented in the picker but when xxx is "11/23/2013 09:15:30" this date is presented.

how can i make it use 'dd/MM/yyyy hh:mm:ss' set format

thanks O.

1
provide which daertetime picker. Jquery? - Nithesh Narayanan
Oh, sorry, kendo ui datetimepicker... - user2603663

1 Answers

4
votes

add both formats as parseFormat

$("#datetimepicker").kendoDateTimePicker({
    format: "yyyy/MM/dd hh:mm tt",
    parseFormats: ["MMMM yyyy", "HH:mm"] //format also will be added to parseFormats
});