React-datepicker: Ability to select a time range

Created on 16 Nov 2018  路  4Comments  路  Source: Hacker0x01/react-datepicker

Hi,

This seems like the most versatile calendar picker, but I could not see in the examples if it's possible to select a time range, only a date range. Is that correct? Thanks

wontfix

Most helpful comment

+1

 minDate={new Date(new Date().setHours(0, 0, 0, 0))}
 maxDate={new Date(new Date().setHours(12, 0, 0, 0))}

the property above is of no effect. I want user can only select time betten 00:00 and 12:00.

All 4 comments

+1

 minDate={new Date(new Date().setHours(0, 0, 0, 0))}
 maxDate={new Date(new Date().setHours(12, 0, 0, 0))}

the property above is of no effect. I want user can only select time betten 00:00 and 12:00.

minTime={new Date().setHours(0,0,0)}
maxTime={new Date().setHours(12,0,0)}

It should be ok.

minTime={new Date().setHours(0,0,0)}
maxTime={new Date().setHours(12,0,0)}

screenshot_5

It's working, but:

Warning: Failed prop type: Invalid prop minTime of type Number supplied to DatePicker, expected instance of Date.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jbccollins picture jbccollins  路  3Comments

formigone picture formigone  路  3Comments

dhruvparmar372 picture dhruvparmar372  路  3Comments

ali-master picture ali-master  路  3Comments

jjjss94 picture jjjss94  路  3Comments