import {ru} from 'date-fns/esm/locale'
<MuiPickersUtilsProvider locale={ru} utils={DateFnsUtils}>
<KeyboardDatePicker
id="mui-pickers-date"
label="Appointment Date"
value={selectedDate}
onChange={handleDateChange}
className={classes.textFieldDropdown}
KeyboardButtonProps={{
'aria-label': 'change date',
}}
/>
</MuiPickersUtilsProvider>
<TextField
error={errorStatus.slotID}
select
label="Time Slot"
className={classes.textFieldDropdown}
value={appointmentFields.slotID}
onChange={handleChange('slotID')}
>
references:
https://stackoverflow.com/questions/58677350/how-to-change-the-language-for-keyboarddatepicker-material-ui
No comments:
Post a Comment