Merge pull request #1396 from Jubair70/Jubair70/fixes-date-selection

Fixed date selection by selecting month after year
This commit is contained in:
Amruth Pillai
2023-07-21 22:13:06 +02:00
committed by GitHub
+2 -1
View File
@@ -58,7 +58,8 @@ const ResumeInput: React.FC<Props> = ({ type = 'text', label, path, className, m
openTo="year"
label={label}
value={dayjs(value)}
slots={{ textField: (params) => <TextField {...params} error={false} className={className} /> }}
views={['year', 'month', 'day']}
className={className}
onChange={(date: dayjs.Dayjs | null) => {
if (!date) return onChangeValue('');
if (dayjs(date).isValid()) return onChangeValue(dayjs(date).format('YYYY-MM-DD'));