Is there a way to clear the visible range selection in the calendars when the popup shows up without clearing the selected start and end-dates?

1 Answer 9 Views
DateRangePicker
Rune
Top achievements
Rank 1
Rune asked on 26 Apr 2022, 08:17 AM

In some odd user-cases it is handy not to show the selected range inside the calendar when it shows up.

Case: Lets say you have a range already selected. Then you click the current start-date in the calendar which pops up. Further you click a new date back in time. This sets a new start date instead of selecting the end-date. The combination of actions requires 3 clicks to set the new range.

If the user unfortunately clicks on the start-date, it's not obvious to some people that the next date you select is still a start-date, unless you are aware that the controller does not select ranges backward in the calendar.

 

1 Answer, 1 is accepted

Sort by
0
Yanislav
Telerik team
answered on 28 Apr 2022, 01:26 PM

Hello Rune,

In order to clear the selection, you could try to use the range() method. Here is an example :
https://netcorerepl.telerik.com/wwkSmMPH19PcQccU37

However, as you can see the range() method, also clears the start and end dates. So in order to clear the selection when the Open event is fired, I recommend you the following approach:

1. Hook up for the Open event.
2. Append a button to the footer.
3. Clear the selection when the button is clicked

Here is an example: https://netcorerepl.telerik.com/cQEoGMFx24laNyHL04

I hope this helps.

Regards,
Yanislav
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
DateRangePicker
Asked by
Rune
Top achievements
Rank 1
Answers by
Yanislav
Telerik team
Share this question
or