Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feat] Modifiable external_date_format #2537

Open
tylerbarna opened this issue Jul 31, 2023 · 3 comments · May be fixed by #2726
Open

[feat] Modifiable external_date_format #2537

tylerbarna opened this issue Jul 31, 2023 · 3 comments · May be fixed by #2726
Labels
type: feature New feature or request

Comments

@tylerbarna
Copy link

tylerbarna commented Jul 31, 2023

Does your feature request relate to a specific USWDS component?

DatePicker and, by extension, DateRangePicker

What USWDS Version is this feature present in?

2.8.0 via #803

Is your feature request related to a problem? Please describe.

The date range picker doesn't seem to have a way to modify the external date format from MM/DD/YYYY to other common formats, though YYYY-MM-DD is used in the backend

Describe the solution you'd like

Provide a property to a call to DateRangePicker or DatePicker to specify the external date format. In my case, having an option to use the YYYY-MM-DD format in both the backend and frontend

Describe alternatives you've considered

Attempted to work around this by converting from MM/DD/YYYY to YYYY-MM-DD after setting a URL parameter, but this is not reflected in the URL parameter itself and also results in the date picker element being blank

Additional context

I'm attempting to implement a date range filter for the NASA GCN Project (in-progress PR for backend here) with a consistent ISO format for both front and backend, as astronomers are more inclined to use YYYY-MM-DD than MM/DD/YYYY

@brandonlenz
Copy link
Contributor

Seems worth implementing. USWDS does not provide strict guidance on only using a specific format, just describing the format used to the user clearly: https://designsystem.digital.gov/components/date-picker/

@werdnanoslen werdnanoslen linked a pull request Feb 23, 2024 that will close this issue
@werdnanoslen
Copy link
Contributor

@tylerbarna would #2726 deliver this feature fully for you?

@tylerbarna
Copy link
Author

@tylerbarna would #2726 deliver this feature fully for you?

Yes, I believe so!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants