Datetimepicker value for different formats

I want to set the ui DateTimePicker kendo to a value using: "dd/MM/yyyy hh:mm:ss" (note the order of dd and MM).

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

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

how can i use the 'dd/MM/yyyy hh:mm:ss' format

thanks O.

+4
source share
1 answer

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 }); 
+4
source

Source: https://habr.com/ru/post/1492547/


All Articles