@abgov/react-components 6.7.0 → 6.7.1-alpha.2
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.js +10 -3
- package/index.js.map +1 -1
- package/index.mjs +10 -3
- package/index.mjs.map +1 -1
- package/lib/date-picker/date-picker.d.ts +3 -3
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -616,17 +616,24 @@ function GoabDatePicker({
|
|
|
616
616
|
}
|
|
617
617
|
};
|
|
618
618
|
}, [onChange]);
|
|
619
|
+
const formatValue = (value2) => {
|
|
620
|
+
if (!value2) return "";
|
|
621
|
+
if (value2 instanceof Date) {
|
|
622
|
+
return value2.toISOString();
|
|
623
|
+
}
|
|
624
|
+
return value2;
|
|
625
|
+
};
|
|
619
626
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
620
627
|
"goa-date-picker",
|
|
621
628
|
{
|
|
622
629
|
ref,
|
|
623
630
|
name,
|
|
624
|
-
value: (value
|
|
631
|
+
value: formatValue(value),
|
|
625
632
|
type,
|
|
626
633
|
error: error ? "true" : void 0,
|
|
627
634
|
disabled: disabled ? "true" : void 0,
|
|
628
|
-
min: min
|
|
629
|
-
max: max
|
|
635
|
+
min: formatValue(min),
|
|
636
|
+
max: formatValue(max),
|
|
630
637
|
testid: testId,
|
|
631
638
|
mt,
|
|
632
639
|
mr,
|