react-date-range icon indicating copy to clipboard operation
react-date-range copied to clipboard

New Feature: Add time support

Open joeyparis opened this issue 4 years ago • 13 comments

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.

joeyparis avatar May 13 '21 17:05 joeyparis

Can one of the maintainers please take a look at this?

sdabhi23 avatar Sep 14 '21 13:09 sdabhi23

Any progress on this guys ?!

Can anyone take a look at the PR and maybe approve ?!

Thanks in advance.

lyvyu avatar Nov 16 '21 22:11 lyvyu

Bump. This would be a greatly appreciated merge

benjamincharity avatar Apr 14 '22 18:04 benjamincharity

+1

Be happy to contribute as well in merging this feature

brent-varga avatar May 11 '22 18:05 brent-varga

+1

StreetHoboSP avatar May 24 '22 13:05 StreetHoboSP

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

keremciu avatar May 27 '22 11:05 keremciu

Would love to see this. Looking forward to this PR getting reviewed and approved soon.

pzipoy avatar Jun 14 '22 18:06 pzipoy

Hi, @joeyparis Why this PR didn't get merged?

Weiting-Zhang avatar Aug 03 '22 05:08 Weiting-Zhang

@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.

joeyparis avatar Aug 03 '22 14:08 joeyparis

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.

keremciu avatar Aug 03 '22 15:08 keremciu

I'd love to see this feature added, too.

mjlachman avatar Jan 26 '23 21:01 mjlachman

+1

sathishkumar16 avatar Feb 02 '23 05:02 sathishkumar16

+1 for this. It is greatly needed

MladenStojkovic avatar May 15 '23 10:05 MladenStojkovic