react-datepicker icon indicating copy to clipboard operation
react-datepicker copied to clipboard

Unable to select 24 in showTimeSelectOnly

Open Nestoro opened this issue 10 months ago • 1 comments

Is your feature request related to a problem? Please describe.

In the showTimeSelectOnly picker using HH:mm formatting there is no 24.

Describe the solution you'd like

The range extended in showTimeSelectOnly mode to show 24

Should be realizable by changing this line: https://github.com/Hacker0x01/react-datepicker/blob/45001008781cdbea9c5e1c9ac08cbc5ad0314ac4/src/time.jsx#L184

to be less or equal. But the display might flip to 0.

Nestoro avatar Apr 15 '24 13:04 Nestoro

You can change your date format to kk:mm to achieve this. You can find all the available date time formats here. kk corresponds to hours between 1 and 24.

But interestingly, the 24:00 option will be displayed at the top of the dropdown.

hugoburguete avatar Apr 30 '24 16:04 hugoburguete