react-better-html 1.1.175 → 1.1.176
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 +3 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6221,6 +6221,7 @@ function Calendar({ value, minDate, maxDate, onChange }) {
|
|
|
6221
6221
|
days.map((day, index) => {
|
|
6222
6222
|
const thisDayDate = new Date(currentYear, currentMonth, day);
|
|
6223
6223
|
const isSelected = day !== void 0 && day === currentDate?.getDate() && currentMonth === currentDate.getMonth() && currentYear === currentDate.getFullYear();
|
|
6224
|
+
const isToday = thisDayDate.getDate() === (/* @__PURE__ */ new Date()).getDate() && thisDayDate.getMonth() === (/* @__PURE__ */ new Date()).getMonth() && thisDayDate.getFullYear() === (/* @__PURE__ */ new Date()).getFullYear();
|
|
6224
6225
|
const isWeekend = thisDayDate.getDay() === 6 || thisDayDate.getDay() === 0;
|
|
6225
6226
|
const isDisabled = minDate && thisDayDate.getTime() < minDate.getTime() || maxDate && thisDayDate.getTime() > maxDate.getTime();
|
|
6226
6227
|
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
@@ -6232,7 +6233,8 @@ function Calendar({ value, minDate, maxDate, onChange }) {
|
|
|
6232
6233
|
alignItems: "center",
|
|
6233
6234
|
justifyContent: "center",
|
|
6234
6235
|
backgroundColor: isSelected ? theme2.colors.primary : theme2.colors.backgroundContent,
|
|
6235
|
-
filterHover: !isDisabled ? "brightness(0.9)" : void 0,
|
|
6236
|
+
filterHover: day && !isDisabled ? "brightness(0.9)" : void 0,
|
|
6237
|
+
border: `1px solid ${isToday ? theme2.colors.primary : theme2.colors.primary + "00"}`,
|
|
6236
6238
|
borderRadius: theme2.styles.borderRadius / 2,
|
|
6237
6239
|
padding: theme2.styles.space / 2,
|
|
6238
6240
|
cursor: day ? !isDisabled ? "pointer" : "not-allowed" : void 0,
|