Search code examples
reactjsmaterial-uidatepickerreact-datepicker

change text or language mui mobile date picker react js


how to change the text "clear", or change the language of this inscription?

enter image description here

<LocalizationProvider adapterLocale={ru} dateAdapter={AdapterDateFns}>
                                <MobileDatePicker
                                    inputFormat={"dd.MM.yyyy"}
                                    closeOnSelect={true}
                                     inputProps={{
                                        ...params.inputProps,
                                        placeholder: "date",
                                        style : { fontWeight : "bold", color : "#555" }
                                    }} />}  />
                        </LocalizationProvider>


Solution

  • solution

    <LocalizationProvider dateAdapter={AdapterJalali} localeText={{ cancelButtonLabel: "example", okButtonLabel: "example", clearButtonLabel: "example" }}>
      ...
    </LocalizationProvider>