Open jer3m01 opened 10 months ago
Hi @jer3m01
I was going through the Kobalte UI components and the reference you shared above for the TimeField
component. Could you please advice on how we can implement this?
I noticed that we have a NumberField
component. Should we consider using that as a base? Additionally, what attributes should we include for this component? Some that come to my mind are value
, onChange
, validate
, and label
.
Also, should we support both hh:mm:ss
and hh:mm
formats, and what about AM/PM
versus 24-hour
format options?
This component should be similar to NumberField
but based on TextField
(so don't extend NumberField
, copy a similar structure. We might make a more generic component later, but this shouldn't be done in this PR).
The format options should be available as props like https://react-spectrum.adobe.com/react-spectrum/TimeField.html#props.
Please use https://www.npmjs.com/package/@internationalized/date for performing any formatting (similar to how NumberField
uses @internationalized/number
.
https://react-spectrum.adobe.com/react-aria/TimeField.html