-
Notifications
You must be signed in to change notification settings - Fork 31
Closed
Description
I would like to have a range with the same start and end dates in the RangeDatePicker.
But clicking on the same day did not change anything.
You can satisfy my requirements by changing the following in your code:
public handleDateChange = (actions: PickerAction) => (date: moment.Moment) => {
...
if (!start) {
startDate = date;
} else {
if (end) {
startDate = date;
endDate = undefined;
} else {
// Original
// if (isDayAfter(date, start)) {
if (!isDayBefore(date, start)) {
endDate = date;
} else {
startDate = date;
}
}
}
...
}y0c