How can I set the placeholder text of the MUI DatePicker
. The text that is displayed when deleting the text in the input field. I want to set the text to "tt.mm.jjjj"
and I always the following error message:
Format string contains an unescaped latin alphabet character `j`
<DatePicker
inputFormat="tt.mm.jjjj"
label="Basic example"
value={value}
onChange={(newValue) => {
setValue(newValue);
}}
renderInput={(params) => <TextField placeholder="tt.mm.jjjj" {...params} />}
/>
DatePicker
? Did you check if there's any documentation of what theinputFormat
prop should be? It seems more likely that it's inputFormat and not placeholder that causes this error. – Alleras