DatePicker theme Issue

2 posts, 0 answers
  1. Steve
    Steve avatar
    35 posts
    Member since:
    Apr 2015

    Posted 11 Aug 2015 Link to this post

    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

  2. Konstantin Dikov
    Admin
    Konstantin Dikov avatar
    1798 posts

    Posted 12 Aug 2015 Link to this post

    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!
     
  3. Kendo UI is VS 2017 Ready
Back to Top