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
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.
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>
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.
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>
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.
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
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.
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
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.