[Feature Request] Date object or ISOString in value DatePicker and similars #4711
rivaslive
started this conversation in
Feature requests
Replies: 1 comment
-
ENG-1761 [Feature Request] Date object or ISOString in value DatePicker and similars |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is your feature request related to a problem? Please describe.
None
Describe the solution you'd like
As a user I want to have the facility to be able to have clean and easy to use pickers, currently it is too much code and complicated to try to make controlled DatePickers so that as a user I would expect the value to be a Date object or an ISOString just like the onChange should be the same, Additionally, it must have a format prop to format the fields in the input and output for that date. But currently we have
import { parseDate } from '@internationalized/date';
in between that very possibly for some devs that is good but for me it is a headache to have to be using it when my app is based on dayjs and I have to be juggling to be able to have a clean ISOString currently I do something like this:But it is unnecessary for me to have to have a wrapper of a wrapper for that, I think they should get rid of
@internationalized/date
even if it is only for the user, internally it can work with it easily.For the TZ it should be possible to accept it as an extra parameter
Describe alternatives you've considered
Like other component libraries, you can configure adapters to output
@internationalized/date
and return the configured adapter, for example an adapter fordatejs
, another fordate-fns
, etc. This way, the community could create the adapters they wanted based on their tastes. Although the first iteration for me should be as native as possible.The bias of having to use
@internationalized/date
overshadows the beauty of this pickerScreenshots or Videos
No response
Beta Was this translation helpful? Give feedback.
All reactions