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

RadDateTimePicker Calendar

7 Answers 238 Views
Calendar, DateTimePicker, TimePicker and Clock
This is a migrated thread and some comments may be shown as answers.
Martin
Top achievements
Rank 1
Martin asked on 09 Nov 2010, 10:40 AM
Hello,

I am trying to set SpecialDays on the Calendar element within the DateTimePicker but I cannot see how to obtain a reference to the Calendar itself. I see CalendarLocation and CalendarSize but no reference to the actual Calendar, even if I look in the Controls collection.

Thanks for your help
Martin

7 Answers, 1 is accepted

Sort by
0
Richard Slade
Top achievements
Rank 2
answered on 09 Nov 2010, 10:49 AM
Hi, 

There is a simple API to set Special days. Please have a look at this documentation which should help. 

There is also an additional forum post here about removing special days.

Let me know if you need any more information. 
Richard
0
Martin
Top achievements
Rank 1
answered on 09 Nov 2010, 10:55 AM
Thanks for your quick response to my post but I was referring to the DateTimePicker control, there is no way I can see to reference the Calendar within it. If I had a reference to the Calendar then yes, I could set the special days as you suggest.
0
Accepted
Richard Slade
Top achievements
Rank 2
answered on 09 Nov 2010, 11:12 AM
Apologies Martin, 

this link tell you how to get to the calendar element of the RadDateTimePicker. 

Hope that helps
Richard
0
Accepted
Richard Slade
Top achievements
Rank 2
answered on 09 Nov 2010, 11:16 AM
And here is an example of setting Special days..

Private Sub RadDateTimePicker1_Opened(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadDateTimePicker1.Opened
    Dim dtcalendar As RadDateTimePickerCalendar = DirectCast(Me.RadDateTimePicker1.DateTimePickerElement.GetCurrentBehavior(), RadDateTimePickerCalendar)
    Dim calendar As RadCalendar = dtcalendar.Calendar
    calendar.SpecialDays.Add(New RadCalendarDay(New Date(2010, 11, 10)))
End Sub

Let me know if you need more help
richard
0
Richard Slade
Top achievements
Rank 2
answered on 10 Nov 2010, 08:37 AM
Hi Martin,

How did this go for you? If this has worked for you, please mark as answer so others can find the solution too. If you need more help, just let me know.

Thanks
Richard
0
Matt Low
Top achievements
Rank 1
answered on 02 Dec 2010, 05:17 AM
Richard - Do you happen to know if the samething be accomplished, or is there an equivalent for this, using the ASP.NET AJAX RadDateTimePicker? Please see my post at:  http://www.telerik.com/community/forums/aspnet-ajax/calendar/raddatetimepickercalendar-available-for-asp-net-ajax.aspx. Thanks.

Matt
0
Richard Slade
Top achievements
Rank 2
answered on 02 Dec 2010, 10:55 AM
Hi Matt,

Sorry, I don't know. I haven't used the ASP.NET controls for some time now. Best to ask in the ASP.NET forum where teh experts for that live.
Apologies I can't be of more help
Richard
Tags
Calendar, DateTimePicker, TimePicker and Clock
Asked by
Martin
Top achievements
Rank 1
Answers by
Richard Slade
Top achievements
Rank 2
Martin
Top achievements
Rank 1
Matt Low
Top achievements
Rank 1
Share this question
or