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

DatePicker change color backgroud

8 Answers 1096 Views
Date/Time Pickers
This is a migrated thread and some comments may be shown as answers.
Flavio Lepka
Top achievements
Rank 1
Flavio Lepka asked on 27 Sep 2013, 05:41 PM
 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/

8 Answers, 1 is accepted

Sort by
0
Alexander Popov
Telerik team
answered on 01 Oct 2013, 05:50 AM
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!
0
Flavio Lepka
Top achievements
Rank 1
answered on 03 Oct 2013, 02:54 PM
Hi,
I try this way, but i can´t do. Could be give a demo in jsddle.net.

tks.
0
Alexander Popov
Telerik team
answered on 04 Oct 2013, 09:48 AM
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!
0
Flavio Lepka
Top achievements
Rank 1
answered on 04 Oct 2013, 12:51 PM
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
0
Alexander Popov
Telerik team
answered on 04 Oct 2013, 01:20 PM
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!
0
Flavio Lepka
Top achievements
Rank 1
answered on 06 Oct 2013, 06:16 PM
Hi
Alexander Popov,

Thanks a lot. But this way when changed for next month and back to previous disappear.
0
Alexander Popov
Telerik team
answered on 07 Oct 2013, 11:36 AM
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!
0
Accepted
Flavio Lepka
Top achievements
Rank 1
answered on 08 Oct 2013, 08:02 PM
Tks a lot!!!You saved my life.That´s perfect.
Tags
Date/Time Pickers
Asked by
Flavio Lepka
Top achievements
Rank 1
Answers by
Alexander Popov
Telerik team
Flavio Lepka
Top achievements
Rank 1
Share this question
or