Choose a range (start and end dates)

2 posts, 0 answers
  1. Alexander
    Alexander avatar
    3 posts
    Member since:
    Nov 2015

    Posted 25 Nov 2015 Link to this post


    I am experiencing a problem with RadDatePicker

    In my application, the user chooses Start date and End date and according to that, the grid is updated.

    I would like to avoid using Refresh button, i.e. letting the user pick both dates and then click refresh to get the data.

    On the other hand, I don't want to update the data each time one of the Pickers is changed, before the second one is also picked.

    I would like to do it this way: when user picks one of the dates, the second DatePicker expands for him so he can immediately choose a second date, and no need to click a refresh button. What happens is that DatePicker.IsDropDownOpen property seems not working from code behind.

    In DatePicker1 SelectionChanged event handler, I am doing DatePicker2.IsDropDownOpen=true, but this doesn't work. The DatePicker2 stays closed.


    Maybe there is another control, like doubleDatePicker which makes it possible to choose a range of dates? Like in CheckIn-Checkout pages on the internet, the datepicker control consists of 2 calendars.


    Thanks in advance for your help.


  2. Nasko
    Nasko avatar
    556 posts

    Posted 26 Nov 2015 Link to this post

    Hello Alexander,

    In order to open the second RadDatePicker as expected from the SelectionChanged event of the first one you need to set the IsDropDownOpen property inside a Dispatcher as shown below:
    private void dateTimePicker1_SelectionChanged(object sender, SelectionChangedEventArgs e)
        Dispatcher.BeginInvoke(new Action(() =>
            this.dateTimePicker2.IsDropDownOpen = true;

    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
  3. DevCraft R3 2016 release webinar banner
Back to Top