Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DateRangePicker minTime maxTime have impact for everyday #5651

Open
morela opened this issue Oct 7, 2022 · 5 comments · May be fixed by #5658
Open

DateRangePicker minTime maxTime have impact for everyday #5651

morela opened this issue Oct 7, 2022 · 5 comments · May be fixed by #5658

Comments

@morela
Copy link

morela commented Oct 7, 2022

Code Sandbox

https://codesandbox.io/s/blueprintjs-block-time-in-past-gt1xb9?file=/src/index.js

Steps to reproduce

  1. Click on input
  2. Select dates range - startDate set to today date and end date somewhere in the future
  3. Try to change time input to some hour in the past (If now is 13 then to pick 12 should be disallowed - it's ok)
  4. Do the same for End Date - entire date is in future but you still can't pick hour and minute which is under today time. In this example 12 will be disallowed again - it's not ok.

Actual behavior

When I set minTime then it will be set for everyday.
When I set minDate then it doesn't have impact on time inputs.

2022-10-07_13h18_50

Expected behavior

I want to set date in future without impact of minTime or maxTime
I want to set different minTime and maxTime seperatelly for startTime and endTime

@tinopetros
Copy link
Contributor

This one has me torn, because it appears that timePickerProps are passed down to each timePicker, hence minTime is also holding for the right time picker - yet, I cannot think of a use case where this would be useful. I am considering ensuring minTime is only used on the left time picker and maxTime only on the right.

@bkuzminski
Copy link

@tinopetros @adidahiya Could also be added possibility to disable seperately left or right time input? Right now we can disable only both.

@adidahiya
Copy link
Contributor

See my comment here: #3509 (comment)

I think the API should be changed so that timePickerProps.minTime and timePickerProps.maxTime are ignored (deprecated) in favor of the time attached to minDate and maxDate.

Also related: #5502

@adidahiya
Copy link
Contributor

@bkuzminski that sounds like a separate request, can you file a new issue for it?

@thasner
Copy link
Contributor

thasner commented Oct 30, 2023

@adidahiya adidahiya removed their assignment Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants