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

How to hilight 'Today' s date

9 Answers 137 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Rao
Top achievements
Rank 1
Rao asked on 08 Jun 2009, 01:15 PM
Hi please can some one help me with this problem.
I have a Rad calendar control next to a text box and when I select a date i will be added to the text box. I also would like when I click on the caledar conrol 'Today's date background color be different from the rest of the days so that the user see todays date. This is usually done by default on aspx.net calendar control but i can get it work on Rad calendar control.

Thanks
Rao

9 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 08 Jun 2009, 01:33 PM
Hello Rah,

Please find attached a sample project which demonstrates the desired functionality.  Try it on your end and let me know how it goes.

Also you can review the following online demo:
Today's Date

Greetings,
Pavlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Rao
Top achievements
Rank 1
answered on 09 Jun 2009, 09:38 AM
Hi Pavlina,

Thanks for your help now clendar control works but I tried to do the same thing with RadDateTimePicker but it does not work.
Here is my script.

<

 

telerik:RadDateTimePicker ID="openDate" runat="server" SharedCalendarID="SharedCalendar">

 

 

<TimePopupButton ImageUrl="" HoverImageUrl=""></TimePopupButton>

 

<

 

TimeView CellSpacing="-1" runat="server" Culture="English (United Kingdom)"></TimeView>

 

 

 

<telerik:Calendar ID="Calendar1" runat="server" >

 

 

<SpecialDays>

 

 

<telerik:RadCalendarDay Repeatable="Today" IsToday="true" IsSelected="true" ItemStyle-CssClass="rcToday" >

 

 

<ItemStyle BackColor="Yellow"></ItemStyle>

 

 

</telerik:RadCalendarDay>

 

 

</SpecialDays>

 

 

</telerik:Calendar>

 

<

 

DatePopupButton ImageUrl="" HoverImageUrl=""></DatePopupButton>

 

 

</telerik:RadDateTimePicker>

 

0
Pavlina
Telerik team
answered on 09 Jun 2009, 03:54 PM
Hello Rao,

I am sending you a small runnable application which handles the desired functionality. Please give it a try and let me know if you have other questions or problems.

All the best,
Pavlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Rao
Top achievements
Rank 1
answered on 10 Jun 2009, 01:31 PM
Hi Pavlina,
I followed the sample you sent to me still it is not working.
Here it what happining when for the first time I click on the calendar button the Calendar pops up but Today's date is not highlighed.
If select a date and then click on the calendar button again to change that date I see the selected date background color in yellow which is fine.

But I want to see'Today's date highlighed when for the first time I click the button.

here is the html
 

<

 

telerik:RadDateTimePicker ID="dtmIncidentEndDate" runat="server" SharedCalendarID="SharedCalendar" Culture="English (United Kingdom)" TitleFormat="MMMM yyyy" Skin="Sunset">  

 

<Calendar ID="Calendar1" runat="server"  

 

<SpecialDays 

 

<telerik:RadCalendarDay Repeatable="Today" Date=""  

 

<ItemStyle CssClass="Yellow" />  

 

</telerik:RadCalendarDay

 

</SpecialDays 

 

</Calendar 

 

</telerik:RadDateTimePicker

 

 

0
Pavlina
Telerik team
answered on 10 Jun 2009, 03:06 PM
Hi Rao,

I followed your scenario and prepared a simple runnable project that demonstrates the needed approach. Give it a try and let me know if it works for you or if I am leaving something out.

Best wishes,
Pavlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Rao
Top achievements
Rank 1
answered on 15 Jun 2009, 09:06 AM
Hi Pavlina,

I tried your latest sample unfortunatilly still it is not working for me. I issue here is you have put the  

<telerik:RadCalendar /> tag outside   

<

 

telerik:RadDateTimePicker /> tag and as the result the calendar will be displayed all the time and it would not be associated to the click button. 

 

 

I tried to put <telerik:RadCalendar /> tag inside <telerik:RadDateTimePicker /> tag  but <telerik:RadDateTimePicker /> tag does not have <telerik:RadCalender> instead it has <calendar> which I tried but did not work.

Thanks
Rao

 

0
Pavlina
Telerik team
answered on 15 Jun 2009, 01:41 PM
Hi Rao,

To see 'Today's date highlighted when click the button, I suppose you should remove the SharedCalendarID property of RadDateTimePicker: SharedCalendarID="SharedCalendar".
Please give this suggestion a try and let me know if it works for you.

Additionally, if you want to use SharedCalendar, please note that RadCalendar must be outside the RadDateTimePicker tag.
Find more information about how RadDateTimePicker instances can share a RadCalendar control and use it to pick dates in this live demo.

I hope this helps.

All the best,
Pavlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Rao
Top achievements
Rank 1
answered on 23 Jul 2009, 08:11 AM
Hi Pavlina,

I remover SharedCalendarID property of RadDateTimePicker and it worked, but unfortunately I will not be able to use it as I share the  RadDateTimePicker.

Thanks
Rao
0
Pavlina
Telerik team
answered on 27 Jul 2009, 03:01 PM
Hello Rao,

Attached to this message is a simple runnable application that demonstrates the needed approach. Please give it a try and see if it works as expected.

I hope this helps.

Best wishes,
Pavlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Calendar
Asked by
Rao
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Rao
Top achievements
Rank 1
Share this question
or