@danske/sapphire-react-lab 0.87.0 → 0.87.1
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/build/cjs/index.js +3 -3
- package/build/cjs/index.js.map +1 -1
- package/build/esm/Calendar/src/CalendarButtons.js.map +1 -1
- package/build/esm/Calendar/src/CalendarDaysGrid.js +2 -2
- package/build/esm/Calendar/src/CalendarDaysGrid.js.map +1 -1
- package/build/esm/Calendar/src/CalendarMonthOrYearCell.js +1 -1
- package/build/esm/Calendar/src/CalendarMonthOrYearCell.js.map +1 -1
- package/package.json +38 -38
package/build/cjs/index.js
CHANGED
|
@@ -434,8 +434,8 @@ const getRangeHighlight = ({
|
|
|
434
434
|
highlightedRange,
|
|
435
435
|
locale
|
|
436
436
|
}) => {
|
|
437
|
-
const isInSelection = highlightedRange.start.compare(date$1) <= 0 && highlightedRange.end.compare(date$1) >= 0;
|
|
438
|
-
const rangeIsNotASingleDay = highlightedRange && !date.isSameDay(highlightedRange.start, highlightedRange.end);
|
|
437
|
+
const isInSelection = !!highlightedRange && highlightedRange.start.compare(date$1) <= 0 && highlightedRange.end.compare(date$1) >= 0;
|
|
438
|
+
const rangeIsNotASingleDay = !!highlightedRange && !date.isSameDay(highlightedRange.start, highlightedRange.end);
|
|
439
439
|
const isStartOfWeek = date.getDayOfWeek(date$1, locale) === 0;
|
|
440
440
|
const isEndOfWeek = date.getDayOfWeek(date$1, locale) === 6;
|
|
441
441
|
const isStartOfMonth = date.isSameDay(date$1, date.startOfMonth(date$1));
|
|
@@ -521,7 +521,7 @@ function CalendarMonthOrYearCell({
|
|
|
521
521
|
ref
|
|
522
522
|
}, buttonProps), {
|
|
523
523
|
isInGridCell: true,
|
|
524
|
-
isSelected: state.value && isSame[field](state.value, date$1),
|
|
524
|
+
isSelected: !!state.value && isSame[field](state.value, date$1),
|
|
525
525
|
isDisabled: state.isDisabled || isDisabled,
|
|
526
526
|
hasCurrentIndicator: isSame[field](date$1, date.today(state.timeZone))
|
|
527
527
|
}), children));
|