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

Specify the default date when showTimeSelectOnly is at true and default value is null

Open Elanis opened this issue 1 month ago • 0 comments

Hi there,

It seems like the feature doesn't exist but feel free to correct me if I'm wrong!

Feature description:

I have a DatePicker with showTimeSelectOnly at true, and no default value. I can't set a default value since null has a meaning in my app and it has to stay at null until the user set a time. I would like to be able to set a default date (e.g. 2025-11-01) that would be set when we choose a time. For the moment being, if I choose a time (e.g: 09:06), it will choose this hour in the current day (in the example, that would be 2025-13-11 09:06:00 instead of the 2025-11-01 09:06:00 I need).

Is there a way to specify the Date, or a way to add this feature?

Thanks, Elanis

Elanis avatar Nov 13 '25 10:11 Elanis