@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.mjs
CHANGED
|
@@ -614,17 +614,24 @@ function GoabDatePicker({
|
|
|
614
614
|
}
|
|
615
615
|
};
|
|
616
616
|
}, [onChange]);
|
|
617
|
+
const formatValue = (value2) => {
|
|
618
|
+
if (!value2) return "";
|
|
619
|
+
if (value2 instanceof Date) {
|
|
620
|
+
return value2.toISOString();
|
|
621
|
+
}
|
|
622
|
+
return value2;
|
|
623
|
+
};
|
|
617
624
|
return /* @__PURE__ */ jsx(
|
|
618
625
|
"goa-date-picker",
|
|
619
626
|
{
|
|
620
627
|
ref,
|
|
621
628
|
name,
|
|
622
|
-
value: (value
|
|
629
|
+
value: formatValue(value),
|
|
623
630
|
type,
|
|
624
631
|
error: error ? "true" : void 0,
|
|
625
632
|
disabled: disabled ? "true" : void 0,
|
|
626
|
-
min: min
|
|
627
|
-
max: max
|
|
633
|
+
min: formatValue(min),
|
|
634
|
+
max: formatValue(max),
|
|
628
635
|
testid: testId,
|
|
629
636
|
mt,
|
|
630
637
|
mr,
|