Make time unselectable in RadDateTimePicker's time pop window

2 posts, 0 answers
  1. Shoukat
    Shoukat avatar
    1 posts
    Member since:
    Jan 2014

    Posted 01 Jul 2015 Link to this post


    Is there a way to disable or make time unselectable in the Calendar's time pop window.

    My requirement is I have RadDateTimePicker control for From and To dates. When I select From date & time, the selectable date & time in To date-time control should be the value greater than or equal to From date-time value. 

    Currently I have achieved it partially using SelectableDateStart property. Using this property I can control only dates but not time.

    For example,

    I select From date & time as 15-07-2015, 11:30 respectively. Now in the To date-time control the selectable dates are 15-07-2015 and above. It won't allow the user to select date preceding 15-07-2015.

    But the Time preceding 11:30 should be made unselectable which I am unable to achieve.

    Can you please help me with this.


    I am new to this forum and to WPF development. I'm sorry If I missed out some standard of creating new thread in the forum.


    Thanks in advance.


    Best Regards,


  2. Geri
    Geri avatar
    62 posts

    Posted 06 Jul 2015 Link to this post

    Hi Shoukat,

    You can use the StartTime property of RadDateTimePicker and set the desired time. If you want this time to be the same for each date that can be selected, this works out of the box. If you want to apply a particular starting time only on one day, you need to implement a custom logic that checks if the day is the desired one and sets a custom value for StartTime only for this day.

    You can do this in the EventHandler of the SelectionChanged event:

    private void picker_SelectionChanged(object sender, SelectionChangedEventArgs e)
               if ((DateTime)e.AddedItems[0] == new DateTime(2015, 07, 15, 00, 00, 00))
                   (sender as RadDateTimePicker).StartTime = new TimeSpan(11, 30, 00);
                   (sender as RadDateTimePicker).StartTime = new TimeSpan(00, 00, 00);

    More on the selection in RadDateTimePicker you can find here:

    Please note that the hours that precede the set StartTime value won't be visible.

    Hope this helps.

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top