Reputation: 1
Currently it shows 12:00 but I want to show add text 12 hours : 00 minutes.
How can I modify?
I try to add format with translate function language that built-in Project
format={HH[${_T("시")}] mm[${_T("분")}]}
but it wont work.
<TimePicker
disablePast={true}
closeOnSelect={true}
format="HH:mm"
value={reservationState.startTime}
onChange={(value) => {
if (!isDirty.current) isDirty.current = true;
setReservationState({ ...reservationState, startTime: value as Dayjs });
}}
timeSteps={{ minutes: 1 }}
slots={{
openPickerIcon: ArrowDown,
textField: renderInput,
}}
slotProps={{
popper: { disablePortal: true },
textField: {
error: errorMap?.startTime?.hasError,
helperText: errorMap?.startTime?.message,
},
}}
/>
Currently it shows 12:00 but I want to show add text 12 hours : 00 minutes, add hours and minutes and can locale in different language. How can I modify?
Upvotes: 0
Views: 31