duetds / date-picker

Duet Date Picker is an open source version of Duet Design System’s accessible date picker. Try live example at https://duetds.github.io/date-picker/
https://www.duetds.com
MIT License
1.73k stars 68 forks source link

Abstract the picker component from the input? #55

Open johnjenkins opened 3 years ago

johnjenkins commented 3 years ago

Is your feature request related to a problem? Please describe. The component isn't really a 'date-picker' per se. It's a form field with a date-picker.

In my company we already have a set of full featured, styled form components. So I don't really want to re-style the duet date field, esp as the api of the field is slightly different from the rest of our fields. Ideally, I'd like to just be able to use the 'picker'. This would then allow me to do pre-sets of company preferred settings e.g. date-format or split fields into multiple if I wish e.g. [dd] [mm] [yyyy]

Describe the solution you'd like An abstraction of 2 components. The input and the picker.

Describe alternatives you've considered Adding the git repo as a dependency and re-creating the picker from there.

builtbyjay commented 3 years ago

This is a good suggestion IMO. It would allow the date-picker to be displayed inline as well as in the overlay, which I would find very useful!

jonnystening commented 3 years ago

This request would be greatly appreciated, allowing us to integrate the calendar picker with an existing input component in our design system

brenner-company commented 2 years ago

Is this enhancement, by any chance, already been worked on or on the component roadmap?

dallas commented 2 years ago

Would love to have this feature!

Currently having to do a bunch of hacky workarounds to hide the DatePickerInput component (using a "childList" mutation observer) and trying to two-way synchronize the state of the modal using the provided duetOpen and duetClose events.

Running into an issue with the document click event happening just before my trigger element’s click event, causing my toggle action to always open the modal (basically I think I need to do something like the isClickOutside work-around from the Duet code). 😢

barburak commented 1 year ago

is there any update on this feature request? :)

brenner-company commented 1 year ago

I'm not sure this package is being actively worked on? 😔 The last changes to this repo are from more than 2 years ago.

WickyNilliams commented 7 months ago

Hey, I'm the original author of this project. I've made a spiritual successor to duet here. It's not a full date picker, just the calender component you want here. It also supports displaying multiple months as well as date ranges. https://github.com/WickyNilliams/cally