DurationField based on react-aria #6901
Replies: 1 comment
-
I'm not entirely sure what a DurationField is, is it a range? if so then, maybe start with RangeCalendar. If it's just a length of time as a single value, maybe start with NumberField or TimeField. We support parsing durations https://react-spectrum.adobe.com/internationalized/date/Time.html#parsing-durations so that may be a good way to store your values. The date segments, as you noted, is probably a good way to handle the different fields. Could look at TimeField. |
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
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
we need a DurationField and want to base it on react-aria. As react-aria-components unfortunately does not already offer one, I'm wondering if you have any ideas/starting points with what we could build it?
The duration would be a value of seconds, but for better usability formatted into hours and minutes (similar to the segments in the DateField and TimeField). It is important that it allows for values >24 hours.
Beta Was this translation helpful? Give feedback.
All reactions