react-date-range
react-date-range copied to clipboard
New Feature: Add time support
Add support for selecting times as well as dates. The addition of times is completely optional and disabled by default, this pull request should have no effect on current behaviors unless the showTimePicker prop is passed.
When showTimePicker is set to true, clicking on either DateInput component will show a dropdown of times in 15-minute increments. If editableDateInputs is true, then more specific times can be set by typing them directly. It's important that when showTimePicker is true that the dateDisplayFormat includes date-fn time formatting options. (e.g. MMM d, yyyy h:mma). If a time format isn't included a console warning will be made.
This also comes with a handful of tests to test basic operation but it is not full coverage.
I also had to change the minimum date-fns version to 2.20.0 as that is the earliest version with the eachMinuteOfInterval function.
Related Issue: #195, #4, and possibly #37.
Can one of the maintainers please take a look at this?
Any progress on this guys ?!
Can anyone take a look at the PR and maybe approve ?!
Thanks in advance.
Bump. This would be a greatly appreciated merge
+1
Be happy to contribute as well in merging this feature
+1
this is kinda a good one. We started to merge into TypeScript project but maybe we can consider fundamental changes like this one inside that version
Would love to see this. Looking forward to this PR getting reviewed and approved soon.
Hi, @joeyparis Why this PR didn't get merged?
@Weiting-Zhang I'm not sure, this community response seems positive. I do see there are some merge conflicts now, but I'm not going to resolve them unless a maintainer confirms this will be merged if they're resolved.
yeah actually there were discussions about this will be a big change even it's just behind a prop. like this would turn this package into react-datetime-range.
maintainers were discussing a solution about having two different packages in this repository. react-date-range and react-datetime-range, this way we can introduce esbuild setup too but this is a bigger discussion.
I think maybe we can merge this PR into the project and build multiple-package setup later on to give people access to this change.
I'd love to see this feature added, too.
+1
+1 for this. It is greatly needed