question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to exclude time from the past (minTime), only if selected date is current date (minDate) ?

See original GitHub issue

I found how to exclude dates from the past with minDate, I just pass minDate={moment()}

If I set minTime={moment().hours().minutes()} it will exclude this time from all the dates.

I need to limit user to set time in past of current day.

I look for examples on the website, but could not find proper example.

PS. I Appreciate all the work you do for the community!

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:30
  • Comments:29 (1 by maintainers)

github_iconTop GitHub Comments

15reactions
paulrbergcommented, Apr 22, 2019

Happy to announce that I sorted this out in #1718 🚀

Min Date

Screen Shot 2019-04-21 at 16 28 25

Max Date

Screen Shot 2019-04-21 at 16 28 44

Read more details on the PR page.

7reactions
manishbhatt94commented, Dec 14, 2017

@martijnrusschen please have a look at this feature request!

Read more comments on GitHub >

github_iconTop Results From Across the Web

React-datepicker minTime and maxTime not works
on the selection start date: I want to make disable all times before the current time. So if now 3 AM. before hours...
Read more >
Minimum and Maximum Constraints for Date and Time Pickers
Day of selected date equal to the day of minDate: minTime must be set to the time of minDate while maxTime must be...
Read more >
How to Remove Time from Date/Timestamp in Excel (4 Easy ...
Select the date format you want to use; Click OK. The above steps would instantly hide the time part from the time stamp...
Read more >
React Datepicker crafted by HackerOne
A simple and reusable datepicker component for React.
Read more >
Date Picker & Time Picker | PRISM
Use with a Time Picker to input a date and time. Code​. Default DatePicker​. The DatePicker component displays today's date as a default...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found