cr-ui-lib 1.1.118 → 1.1.119

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -2315,6 +2315,13 @@ var DateRangePicker = ({
2315
2315
  }
2316
2316
  };
2317
2317
  const handleDateClick = (date, isLeftCalendar) => {
2318
+ if (startDate !== null && endDate !== null && startDate === date) {
2319
+ setEndDate(date);
2320
+ }
2321
+ if (startDate !== null && endDate === null && isLeftCalendar) {
2322
+ setEndDate(date);
2323
+ return;
2324
+ }
2318
2325
  if (startDate !== null && endDate === null && isLeftCalendar || startDate !== null && endDate !== null && (startDate == null ? void 0 : startDate.getTime()) === (endDate == null ? void 0 : endDate.getTime()) && isLeftCalendar) {
2319
2326
  setStartDate(null);
2320
2327
  setEndDate(null);