Updated changelog + date field default value

This commit is contained in:
Elio Struyf
2024-02-28 11:43:36 +01:00
parent 65364b8486
commit be5d15d2f8
5 changed files with 14 additions and 10 deletions
@@ -37,7 +37,11 @@ export const DateTimeField: React.FunctionComponent<IDateTimeFieldProps> = ({
const onDateChange = React.useCallback((date: Date) => {
setDateValue(date);
onChange(DateHelper.format(date, format || DEFAULT_FORMAT) || "");
if (format) {
onChange(DateHelper.format(date, format) || "");
} else {
onChange(date.toISOString());
}
}, [format, onChange]);
const showRequiredState = useMemo(() => {