DatePicker change color backgroud

9 posts, 1 answers
  1. Flavio Lepka
    Flavio Lepka avatar
    8 posts
    Member since:
    Mar 2006

    Posted 27 Sep 2013 Link to this post

     I am using kendo date picker in couple of places in my application, and need to change the background when the date is greater and equal to 10/2013. How this in the attached image.

    http://jsfiddle.net/TXUDw/2/
  2. Alexander Popov
    Admin
    Alexander Popov avatar
    1416 posts

    Posted 01 Oct 2013 Link to this post

    Hello Flavio,

    You can change the background of certain dates by adding a custom class through a Kendo UI Template, as shown in this demo.
     

    Regards,
    Alexander Popov
    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
  4. Flavio Lepka
    Flavio Lepka avatar
    8 posts
    Member since:
    Mar 2006

    Posted 03 Oct 2013 Link to this post

    Hi,
    I try this way, but i can´t do. Could be give a demo in jsddle.net.

    tks.
  5. Alexander Popov
    Admin
    Alexander Popov avatar
    1416 posts

    Posted 04 Oct 2013 Link to this post

    Hi Flavio,

    Here is an example here.
     

    Regards,
    Alexander Popov
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  6. Flavio Lepka
    Flavio Lepka avatar
    8 posts
    Member since:
    Mar 2006

    Posted 04 Oct 2013 Link to this post

    Hi,

    Alexander Popov

    Thanks for your example,  i did some change, because i need this way. Between 12/2013 and 12/2015 the background change to red.
    Is it possible?Can you help me, please?

    http://jsbin.com/ETUtemA/1/edit

    Thanks a lot for helped.

    http://www.kendoui.com/clientsfiles/8c3a826e-9aae-631b-85d4-ff000054ddc5_img_27092013_124748.png?sfvrsn=0
  7. Alexander Popov
    Admin
    Alexander Popov avatar
    1416 posts

    Posted 04 Oct 2013 Link to this post

    Hi Flavio,

    I apologize for misleading you. The DatePicker currently supports templates only for the "month" view and you want to highlight items in the "year" view. This could be achieved by using the DatePicker's open event and then searching for the cells containing the months you'd like to highlight. Here is an example of that behavior.
     

    Regards,
    Alexander Popov
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  8. Flavio Lepka
    Flavio Lepka avatar
    8 posts
    Member since:
    Mar 2006

    Posted 06 Oct 2013 Link to this post

    Hi
    Alexander Popov,

    Thanks a lot. But this way when changed for next month and back to previous disappear.
  9. Alexander Popov
    Admin
    Alexander Popov avatar
    1416 posts

    Posted 07 Oct 2013 Link to this post

    Hello again,

    Basically when you open the DataPicker a Calendar widget is initialized, so you should be able to subscribe for the it's navigate event and highlight the dates from there. Here is an example.
     

    Regards,
    Alexander Popov
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  10. Answer
    Flavio Lepka
    Flavio Lepka avatar
    8 posts
    Member since:
    Mar 2006

    Posted 08 Oct 2013 Link to this post

    Tks a lot!!!You saved my life.That´s perfect.
Back to Top
Kendo UI is VS 2017 Ready