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

[New Primitive] DatePicker #1503

Closed
ranjithpmankada opened this issue Jul 2, 2022 · 24 comments
Closed

[New Primitive] DatePicker #1503

ranjithpmankada opened this issue Jul 2, 2022 · 24 comments
Labels
Difficulty: Hard This issue is likely very difficult Type: New Primitive Request for a new primitive

Comments

@ranjithpmankada
Copy link

Feature request

Overview

Examples in other libraries

Who does this impact? Who is this for?

Additional context

@benoitgrelard benoitgrelard added Type: New Primitive Request for a new primitive Difficulty: Hard This issue is likely very difficult labels Jul 4, 2022
@benoitgrelard benoitgrelard changed the title [New Primitive] Data Picker [New Primitive] Date Picker Jul 4, 2022
@benoitgrelard
Copy link
Contributor

@ranjithpmankada I'm guessing you meant "Date" picker right? I've updated the title, but let me know if you meant something else.

@nathanielrindlaub
Copy link

If we are in fact talking about a date picker - I too would love to see a primitive for it!

@yumin-chen
Copy link

Seems to be a duplicate of #969 but I too would love to see a date picker and a date range picker primitive too.

@abhic91
Copy link

abhic91 commented Aug 16, 2022

Seems to be a duplicate of #969 but I too would love to see a date picker and a date range picker primitive too.

until then https://react-spectrum.adobe.com/react-aria/useDatePicker.html

@rawnly
Copy link

rawnly commented Sep 9, 2022

I recently built my own DateRangePicker combining radix and @h6s/calendar it actually works pretty well and seems to have good accessibility too (is still wip).

I can share a gist if this can help someone ✌️

CleanShot 2022-09-09 at 17 27 20

@nathanielrindlaub
Copy link

@rawnly I'd love to take a look at a Gist!

@rawnly
Copy link

rawnly commented Sep 9, 2022

@nathanielrindlaub here it is! https://gist.github.com/Rawnly/4ee653d5556ce354c491d20eb1c63027
As i said, is still a POC so no optimisation and code quality might not be the best.

@emigdio821
Copy link

I recently built my own DateRangePicker combining radix and @h6s/calendar it actually works pretty well and seems to have good accessibility too (is still wip).

I can share a gist if this can help someone ✌️

CleanShot 2022-09-09 at 17 27 20

This is looking nice! @rawnly , do you have an example (CodeSandbox) to see it in action? thanks.

@rawnly
Copy link

rawnly commented Feb 17, 2023

Hey, @emigdio821 unfortunately I'm not able to post any source code for this since it is for my company.
Anyway, using a headless calendar + radix popover does the trick. You may want to use a state machine to handle steps and avoid impossible states :)

@a-type
Copy link

a-type commented Apr 13, 2023

I know this is probably not an active pursuit of the team at the moment, but I have a library called calendar blocks which is pretty in-line with the Radix unstyled & composable methodology. I'd be happy to have it 'adopted,' even just absorbed, into Radix if the team is interested.

It mostly does keyboard interaction while staying out of the way in terms of structure and visual design. For example, you could render a single calendar grid, a dual-month view, or even a vertical infinite list of dates, all of which utilize the same underlying state values.

CleanShot 2023-04-13 at 14 13 15

@tannermann
Copy link

Support for new date/time/datetime primitives

@Brenndoerfer
Copy link

Would love to see this, too

@udaya28
Copy link

udaya28 commented Sep 15, 2023

Waiting for date and time picker primitive
can someone suggest any headless date and time picker for react?

@rawnly
Copy link

rawnly commented Sep 15, 2023

@udaya28 i used @h6s/calendar

@benoitgrelard benoitgrelard changed the title [New Primitive] Date Picker [New Primitive] DatePicker Feb 29, 2024
@snovos
Copy link

snovos commented Apr 16, 2024

Any update? Its been almost a year since initial feature request was opened. Seems like datepicker is in high demand within community

@DarioLopes
Copy link

Shadcn has it, patiently waiting for this to come to our beloved Radix 😄

@sersavan
Copy link

Hi, try this one assembled with shadcn

https://shadcn-calendar-component.vercel.app

image

@andagent
Copy link

Is there any update on this feature? I think that there are not a lot of interfaces that don't require date picking, so this is pretty essential.

@gabrielperman
Copy link

Bump, would be fantastic to have this directly in radix 🤝

@musjj
Copy link

musjj commented Oct 19, 2024

Would love to see this too. React Aria is nice, but it has a lot of eccentricities and its special ways of doing things which creates friction when integrating it into a project that is not all-in on React Aria.

For example, it returns its own special date type (@internationalized/date) instead of just a plain Date. And there's also the onPress, etc. stuff.

There's react-day-picker, but it doesn't support type-able date inputs. It's also tied to the date-fns library, which is not ideal if you're using a different date library.

The ecosystem really needs better solutions for special inputs like this (date, number, etc.).

@JeremyMColegrove
Copy link

Would love to see this as well

@chaance chaance closed this as not planned Won't fix, can't repro, duplicate, stale Jan 25, 2025
@cgatian
Copy link

cgatian commented Jan 25, 2025

Sad to see the closed, but it's the right thing to do if the team is not planning it. However, it would be courteous of the devs to provide reasoning to the community.

This might just be a bulk edit, and a comment follow up comment is coming 🙏

@chaance
Copy link
Member

chaance commented Jan 25, 2025

It's not planned at the moment, and that's why it's closed :)

For the moment we have limited bandwidth. There are a few new components we're planning and will discuss when we're ready. Folks are free to weigh in on what they'd like to see in discussions, but issues are for issues and I'm trying to clean up our backlog to make it easier for triaging.

@0xdevalias
Copy link

Shadcn has it

Linking to the relevant parts of shadcn/ui for ease of continuity:

These are both seemingly built on top of React DayPicker (react-day-picker):

  • https://github.com/gpbl/react-day-picker
    • DayPicker is a customizable date picker component for React. Add date pickers, calendars, and date inputs to your web applications.

  • https://daypicker.dev/
    • React DayPicker
      DayPicker is a React component for creating date pickers, calendars, and date inputs for web applications.

    • Features

      • 🛠 Extensive set of props for customizing the calendar.
      • 🎨 Minimal design that can be easily styled with CSS or any CSS framework.
      • 📅 Supports selections of single days, multiple days, ranges of days, or custom selections.
      • 🌍 Can be localized into any language and time zones.
      • 🌐 Support for ISO 8601, Persian, and broadcast calendar.
      • 🦮 Complies with WCAG 2.1 AA requirements for accessibility.
      • ⚙️ Customizable components to extend the rendered elements.
      • 🔤 Easy integration with input fields.
    • DayPicker is written in TypeScript and compiled to CommonJS and ESM. It relies on date-fns for date manipulation and formatting.

Though if you want to use the latest version of react-day-picker (or date-fns), then you might need to use one of these PRs or similar:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Difficulty: Hard This issue is likely very difficult Type: New Primitive Request for a new primitive
Projects
None yet
Development

No branches or pull requests