disabling dates in a DateTimePicker Control

2 posts, 0 answers
  1. Anjan Guha
    Anjan Guha avatar
    6 posts
    Member since:
    Jul 2009

    Posted 27 Jul 2009 Link to this post

    I want to disable all days except Monday for all Months in RAD dateTimePicker. I have wriiten the following Code but still able to select dates other than Monday... 

    public Form1()
                this.radDateTimePicker1.DateTimePickerElement.Opened +=new EventHandler(DateTimePickerElement_Opened);



            private void DateTimePickerElement_Opened(object sender, EventArgs e)
                CalendarTableElement table = ((this.radDateTimePicker1.DateTimePickerElement.GetCurrentBehavior() as
                    RadDateTimePickerCalendar).Calendar.CalendarElement.CalendarVisualElement.Children[0].Children[1] as
                foreach (CalendarCellElement cell in table.Children)
                    cell.Enabled = true;
                    if (cell.Date.DayOfWeek != DayOfWeek.Monday)
                        cell.Enabled = false;



  2. Boyko Markov
    Boyko Markov avatar
    610 posts

    Posted 29 Jul 2009 Link to this post

    Hello Anjan Guha,

    This is not possible in the current version of the control and there is no workaround of this. However in the SP1 release this week we will disallow the selection  of disabled cells.

    If you need more information please write me back.

    All the best,
    Boyko Markov
    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.
  3. DevCraft R3 2016 release webinar banner
Back to Top