79074691

Date: 2024-10-10 13:47:49
Score: 1
Natty:
Report link

I face this with a case

you can replace 12 with the current minutes - get it by new Date().getMinutes(); or by moments moment().minute(); or by dayJs dayjs().minute();

    <TimePicker
          disabledTime={() => ({
            disabledHours: () =>
              Array.from({ length: 24 }, (_, i) => (i >= 1 ? i : i - 1)),
            disabledMinutes: () =>
              Array.from({ length: 60 }, (_, i) =>
                i >= 12 + 1
                  ? i
                  : i - (12 + 1)
              ),
          })}
        />

time picker after disabled some minutes and all hours

Reasons:
  • Probably link only (1):
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Ahmed Korany