This is a migrated thread and some comments may be shown as answers.

DatePicker theme Issue

1 Answer 33 Views
Date/Time Pickers
This is a migrated thread and some comments may be shown as answers.
Steve
Top achievements
Rank 1
Steve asked on 11 Aug 2015, 04:28 PM

Hi All,

 

Could anyone explain why the right datepicker shows up differently from the left although same scripts were applied?  How do I fix it so the ​right looks like the left?

var today = kendo.toString(kendo.parseDate(new Date()), "MM-dd-yyyy");​

    $("#dateFrom").kendoDatePicker({
        value: today
        }
    });

 

TIA,

Steve

1 Answer, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 12 Aug 2015, 03:45 PM
Hello Steve,

Thank you for contacting us.

The approach that you are using is failing and is keeping only the "Today" styles for the cell, because you are passing string to the value property, but that property accepts Date objects only (API reference link). 

With the above in mind, please try the following code for setting the today date:
var today = new Date();​
 
or directly:
 
 $("#datepicker").kendoDatePicker({
  value: new Date()
});

If further questions arise, please feel free to contact us again.



Regards,
Konstantin Dikov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Date/Time Pickers
Asked by
Steve
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
Share this question
or