@trackunit/react-date-and-time-components 0.0.162 → 0.0.163
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/index.cjs.js +1 -1
- package/index.esm.js +1 -1
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -178,7 +178,7 @@ const DayRangePicker = ({ onRangeSelect, selectedDays, disabledDays, dataTestId,
|
|
|
178
178
|
}, [selectedDays]);
|
|
179
179
|
const handleOnRangeSelect = react.useCallback((range) => {
|
|
180
180
|
// store the range
|
|
181
|
-
if (range) {
|
|
181
|
+
if (range && range.from) {
|
|
182
182
|
if (range.to === undefined) {
|
|
183
183
|
setNewRange({ from: range.from, to: range.from });
|
|
184
184
|
}
|
package/index.esm.js
CHANGED
|
@@ -176,7 +176,7 @@ const DayRangePicker = ({ onRangeSelect, selectedDays, disabledDays, dataTestId,
|
|
|
176
176
|
}, [selectedDays]);
|
|
177
177
|
const handleOnRangeSelect = useCallback((range) => {
|
|
178
178
|
// store the range
|
|
179
|
-
if (range) {
|
|
179
|
+
if (range && range.from) {
|
|
180
180
|
if (range.to === undefined) {
|
|
181
181
|
setNewRange({ from: range.from, to: range.from });
|
|
182
182
|
}
|