Skip to content

Commit

Permalink
limit date input to 4 digits
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfauquette committed Nov 19, 2021
1 parent d103b40 commit b289c05
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@ export function GridEditDateCell(props: GridRenderEditCellParams & InputBaseProp
fullWidth
className={classes.root}
type={isDateTime ? 'datetime-local' : 'date'}
inputProps={{
max: isDateTime ? '9999-12-31T23:59' : '9999-12-31',
}}
value={valueState.formatted}
onChange={handleChange}
{...other}
Expand Down

0 comments on commit b289c05

Please sign in to comment.