@eintrek/erp-theme 1.4.11 → 1.4.12
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/components/ui/date-picker.d.ts +3 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.esm.js +13 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +13 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1450,7 +1450,18 @@ function PopoverContent({ className, align = "center", sideOffset = 4, ...props
|
|
|
1450
1450
|
return (require$$1.jsx(PopoverPrimitive__namespace.Portal, { children: require$$1.jsx(PopoverPrimitive__namespace.Content, { "data-slot": "popover-content", align: align, sideOffset: sideOffset, className: cn$1("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden", className), ...props }) }));
|
|
1451
1451
|
}
|
|
1452
1452
|
|
|
1453
|
-
|
|
1453
|
+
/**
|
|
1454
|
+
* Only the lower bound is universal. Rejecting future dates by default made
|
|
1455
|
+
* every forward-looking field — due dates, expiry, delivery, installment
|
|
1456
|
+
* schedules — silently unusable unless the caller remembered to override it,
|
|
1457
|
+
* and several forms already carried `d => d < new Date("1900-01-01")` purely
|
|
1458
|
+
* to undo it. A field that must stay in the past says so with its own
|
|
1459
|
+
* `disabledDates`; the picker no longer guesses.
|
|
1460
|
+
*/
|
|
1461
|
+
const defaultDisabledDates = (date) => date < new Date("1900-01-01");
|
|
1462
|
+
/** Ready-made matcher for fields that genuinely cannot be in the future
|
|
1463
|
+
* (date of birth, an issue date on a document already in hand). */
|
|
1464
|
+
const disallowFutureDates = (date) => date > new Date() || date < new Date("1900-01-01");
|
|
1454
1465
|
const defaultFormatDate = (date) => new Intl.DateTimeFormat("th-TH", {
|
|
1455
1466
|
day: "numeric",
|
|
1456
1467
|
month: "long",
|
|
@@ -35165,6 +35176,7 @@ exports.convertFileToUploadedFile = convertFileToUploadedFile;
|
|
|
35165
35176
|
exports.convertFilesToUploadedFiles = convertFilesToUploadedFiles;
|
|
35166
35177
|
exports.dataTableConfig = dataTableConfig;
|
|
35167
35178
|
exports.databasePrefix = databasePrefix;
|
|
35179
|
+
exports.disallowFutureDates = disallowFutureDates;
|
|
35168
35180
|
exports.flagConfig = flagConfig;
|
|
35169
35181
|
exports.formatCurrency = formatCurrency;
|
|
35170
35182
|
exports.formatDate = formatDate;
|