Skip to content

Commit

Permalink
Fixes date fields autofilling on edit
Browse files Browse the repository at this point in the history
  • Loading branch information
jim-sheldon committed Mar 26, 2024
1 parent 5a5834f commit b4208af
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,8 @@ interface DateFieldProps {
export function DateField(props: DateFieldProps): JSX.Element {
const classes = useStyles();

const dateValue = props.value || 'yyyy/MM/dd';

return (
<div className={classes.fieldRow}>
<LocalizationProvider dateAdapter={AdapterDateFns}>
Expand All @@ -204,7 +206,7 @@ export function DateField(props: DateFieldProps): JSX.Element {
mask="____/__/__"
minDate={new Date('2019/12/01')}
disableFuture
value={props.value}
value={dateValue}
onChange={props.onChange}
renderInput={(params) => (
<MuiTextField
Expand Down

0 comments on commit b4208af

Please sign in to comment.