@bsol-oss/react-datatable5 12.0.0-beta.23 → 12.0.0-beta.24
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.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -3793,7 +3793,7 @@ const PopoverTrigger = react.Popover.Trigger;
|
|
|
3793
3793
|
const DatePicker = ({ column, schema, prefix }) => {
|
|
3794
3794
|
const { watch, formState: { errors }, setValue, } = reactHookForm.useFormContext();
|
|
3795
3795
|
const { translate } = useSchemaContext();
|
|
3796
|
-
const { required, gridColumn, gridRow } = schema;
|
|
3796
|
+
const { required, gridColumn, gridRow, dateFormat = "YYYY-MM-DD[T]HH:mm:ss[Z]", } = schema;
|
|
3797
3797
|
const isRequired = required?.some((columnId) => columnId === column);
|
|
3798
3798
|
const colLabel = `${prefix}${column}`;
|
|
3799
3799
|
const [open, setOpen] = React.useState(false);
|
|
@@ -3809,7 +3809,7 @@ const DatePicker = ({ column, schema, prefix }) => {
|
|
|
3809
3809
|
selected: new Date(selectedDate),
|
|
3810
3810
|
// @ts-expect-error TODO: find appropriate types
|
|
3811
3811
|
onDateSelected: ({ date }) => {
|
|
3812
|
-
setValue(colLabel, dayjs(date).format(
|
|
3812
|
+
setValue(colLabel, dayjs(date).format(dateFormat));
|
|
3813
3813
|
setOpen(false);
|
|
3814
3814
|
} })] }) })] }), errors[`${column}`] && (jsxRuntime.jsx(react.Text, { color: "red.400", children: translate.t(removeIndex(`${colLabel}.field_required`)) }))] }));
|
|
3815
3815
|
};
|
package/dist/index.mjs
CHANGED
|
@@ -3773,7 +3773,7 @@ const PopoverTrigger = Popover.Trigger;
|
|
|
3773
3773
|
const DatePicker = ({ column, schema, prefix }) => {
|
|
3774
3774
|
const { watch, formState: { errors }, setValue, } = useFormContext();
|
|
3775
3775
|
const { translate } = useSchemaContext();
|
|
3776
|
-
const { required, gridColumn, gridRow } = schema;
|
|
3776
|
+
const { required, gridColumn, gridRow, dateFormat = "YYYY-MM-DD[T]HH:mm:ss[Z]", } = schema;
|
|
3777
3777
|
const isRequired = required?.some((columnId) => columnId === column);
|
|
3778
3778
|
const colLabel = `${prefix}${column}`;
|
|
3779
3779
|
const [open, setOpen] = useState(false);
|
|
@@ -3789,7 +3789,7 @@ const DatePicker = ({ column, schema, prefix }) => {
|
|
|
3789
3789
|
selected: new Date(selectedDate),
|
|
3790
3790
|
// @ts-expect-error TODO: find appropriate types
|
|
3791
3791
|
onDateSelected: ({ date }) => {
|
|
3792
|
-
setValue(colLabel, dayjs(date).format(
|
|
3792
|
+
setValue(colLabel, dayjs(date).format(dateFormat));
|
|
3793
3793
|
setOpen(false);
|
|
3794
3794
|
} })] }) })] }), errors[`${column}`] && (jsx(Text, { color: "red.400", children: translate.t(removeIndex(`${colLabel}.field_required`)) }))] }));
|
|
3795
3795
|
};
|