You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current behavior of the date picker does not allow users to select a date range that spans only a single day. When a user clicks on May 5th to set the start date, and then clicks again on May 5th to also set it as the end date, followed by a click on May 7th, the picker resets the selection. Instead of interpreting the first two clicks as defining a one-day range (May 5th–May 5th), it treats the second click on May 5th as a new start date, and then the third click on May 7th as the end date. This results in an unintended selection of May 5th–May 7th. The expected behavior is for the second click on the same date to confirm a single-day range, rather than resetting the selection process.
Proposal
I understand that in some scenarios disallowing single-day ranges is acceptable, but other scenarios (such as mine) are essential having it as a feature.
I detected where that happens (at least in multirange selection): method void _drawRangesSelectionForMonth(dynamic) of class _PickerViewState. My working solution is:
Currently, we don’t have a support for single date selection support in the multi range selection mode in SfDateRangePicker. However, we have already logged a feature request for it in our feedback portal. We will prioritize the features of every release based on demand and priority. So, this feature will be available in any of our upcoming releases. We will notify you here once the release has been rolled out, and we appreciate your patience in the meantime. You can also track the status of the feature using the feedback link provided below.
Use case
The current behavior of the date picker does not allow users to select a date range that spans only a single day. When a user clicks on May 5th to set the start date, and then clicks again on May 5th to also set it as the end date, followed by a click on May 7th, the picker resets the selection. Instead of interpreting the first two clicks as defining a one-day range (May 5th–May 5th), it treats the second click on May 5th as a new start date, and then the third click on May 7th as the end date. This results in an unintended selection of May 5th–May 7th. The expected behavior is for the second click on the same date to confirm a single-day range, rather than resetting the selection process.
Proposal
I understand that in some scenarios disallowing single-day ranges is acceptable, but other scenarios (such as mine) are essential having it as a feature.
I detected where that happens (at least in multirange selection): method
void _drawRangesSelectionForMonth(dynamic)
of class_PickerViewState
. My working solution is:My proposal is to add
allowSingleDaySelection
as a parameter ofSfDateRangePicker
, to make it easier to turn it on and off.The text was updated successfully, but these errors were encountered: