what happens if I select a date by clicking on the calendar it works fine but if the first time I set a date to empty and I will type the date it will not react like date format its go like 11111111111111111111 like this so its break the format of date but if I select from the calendar after that I will edit it work fine only first time if I will edit direct type it goes wrong.
JavaScript
x
18
18
1
<MuiPickersUtilsProvider utils={DateFnsUtils}>
2
<Grid container justifyContent="space-around">
3
<KeyboardDatePicker
4
disableToolbar
5
variant="inline"
6
format="MM/dd/yyyy"
7
margin="normal"
8
id="date-picker-inline"
9
label="Date picker inline"
10
value={formik.values.dob}
11
onChange={handleChangeDate}
12
KeyboardButtonProps={{
13
"aria-label": "change date"
14
}}
15
/>
16
</Grid>
17
</MuiPickersUtilsProvider>
18
Advertisement
Answer
I found this example, that seems to do exactly what you are trying to do. Does it helps ?