Replies: 5 comments 7 replies
-
Is this for a specific locale? DateField's date segment format should adapt itself automatically to match the provided Provider locale. https://codesandbox.io/s/react-spectrum-template-forked-t8bfr0?file=/src/App.js This example is with |
Beta Was this translation helpful? Give feedback.
-
Adding to this one is it possible to format segments like I assume the easiest option is not to use DateField then at all, and just picker, while the field is a 100% presentational component or a button that triggers the opening of the calendar/picker. Or it's rather unsupported (partial disabling editing of the segments or so) and it's easier to move editing 100% to the picker? Thanks. |
Beta Was this translation helpful? Give feedback.
-
I added an example of a workaround for this issue here: #4322 (reply in thread) |
Beta Was this translation helpful? Give feedback.
-
@devongovett does the RAC textfield have the ability to have a readonly inputfield with a custom date format (like Aug 6, 2022 as mentioned by @RIP21) that can double as the trigger element within a dialogtrigger instead of a button and have it open into a calendar on with the enter or space keys? the issue im having atm just using a dynamic button label is having a form label and error message/description above and below the button as i want it to at least visually look like an input field. however there's no way to have an 'error message' against a button, at least semantically, especially if its part of a form. having readonly date pickers where users have to select a date from a calendar does away with a magnitude of what ifs when it comes to the validation of classic date picker segments...my two cents.... |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I was wondering if there is a way to change the date format for segments in the date field from mm/dd/yyyy to yyyy/mm/dd.
Beta Was this translation helpful? Give feedback.
All reactions