click-ui icon indicating copy to clipboard operation
click-ui copied to clipboard

Date/Time Picker Component

Open pjhampton opened this issue 2 years ago • 7 comments

Some upcoming work will require us to take date/times and date/time ranges from users when creating batch / streaming ClickPipes.

We can start with plain text boxes on our end so it's not urgent, but I believe it would enhance the user experience and require less involved input validation in the backend.

pjhampton avatar Jan 24 '24 13:01 pjhampton

This is on the design roadmap

gjones avatar May 16 '24 12:05 gjones

Hi @pjhampton , I have some designs for the date picker.

Simple Date Picker

Users select a single date.

Screenshot 2024-06-27 at 13 37 26

Simple Date Range

Users can select an interval between 2 dates. We can also disable future dates if we want.

Screenshot 2024-06-27 at 13 38 08

Date Range with Predefined Values

To simplify date range selection, we can offer some predefined values, like Past day, Past week Past 2 weeks, Past month, etc, and if those are not enough, we can let users select their own custom period of time.

Screenshot 2024-06-27 at 13 37 50

Date and Time Picker

For ClickPipes, it's useful to pick a specific date and time, this UI aims to address that

crisalbu avatar Jun 27 '24 11:06 crisalbu

Designs can be found here

Deisgns validated with @pjhampton and the design team.

@serdec, can we plan an implementation in the near future?

crisalbu avatar Jun 27 '24 18:06 crisalbu

@crisalbu we don't have the bandwidth at the moment to take on this task

serdec avatar Jun 27 '24 20:06 serdec

@vineethasok and I chatted about and this and he proposed a list of libraries we can use to power this.

  • Ant design. Pros: Lots of functionality, highly active and used library. Cons: may not be very customizable, comes with a whole design library
  • react-multi-date-picker. Pros: Provides the functionality we need, looks pretty easy to use. Cons: is large (~370 kB package size), unclear how performant this is, seems to be a single person maintaining this project.
  • Adobe react-spectrum datepicker: Pros: Extensible, maintained by Adobe. Cons: will probably require more work than the first two libraries, maintained by Adobe.
  • h6s calendar: Pros: extensible, lightweight. Cons: requires us to implement the UI

hoorayimhelping avatar Sep 09 '24 16:09 hoorayimhelping

@hoorayimhelping how did we decide to move forward?

serdec avatar Sep 16 '24 12:09 serdec

@serdec ~haven't made a decision yet. Do you have any preferences on a library?~ I've started initial development using h6s/calendar.

hoorayimhelping avatar Sep 16 '24 13:09 hoorayimhelping

@hoorayimhelping i only used ant design previously, but my experience wasn't really good as as you stated it wasn't really customizable.

I'll trust your judgment, i also know that airbnb have an open source date-picker just fyi

serdec avatar Oct 15 '24 06:10 serdec

I've made good progress on the basic DatePicker. What I'm thinking is that I'll get the basic DatePicker in first, so that if anyone needs one, they can start using it, and then I'll start working on a DateRangePicker.

I'll get a PR up for it in the next couple of days, I need to do some more polishing and add tests before that.

Screenshot 2024-10-15 at 9 22 33 AM Screenshot 2024-10-15 at 9 22 54 AM

hoorayimhelping avatar Oct 15 '24 13:10 hoorayimhelping

looks great!

serdec avatar Oct 15 '24 13:10 serdec

Closing as completed. 🎉

gjones avatar Nov 18 '24 17:11 gjones