Kendo DateTimePicker will not take a different format

2 posts, 0 answers
  1. Daniel
    Daniel avatar
    2 posts
    Member since:
    Jan 2015

    Posted 03 Feb 2015 Link to this post


    I am trying to set a default value of today in my datetimepicker.  However, it will not allow me to change the date time format from "Tue Feb 3 13:54:54 EST 2015" format which I an unable to convert in the c# code.  Here is my javascript code:
    var startDateString = '';
    value: new Date(),
    function () {
    startDateString = kendo.toString(
    format: "0:MM/dd/yyyy"

    if (startDateString == '')

    startDateString = kendo.parseDate($("#start-date-datepickerId").data("kendoDateTimePicker").value());

    Any and all help is appreciated

  2. Alexander Popov
    Alexander Popov avatar
    1436 posts

    Posted 05 Feb 2015 Link to this post

    Hi Daniel,

    Setting an initial value is indeed done through the value option, as in the example you shared. I am not exactly sure what is the expected behavior, however I would recommend supplying a format parameter for the toString method.

    Alexander Popov
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top