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

Date Picker - Make date format configurable #95

Open
jbpenrath opened this issue Jun 15, 2023 · 2 comments
Open

Date Picker - Make date format configurable #95

jbpenrath opened this issue Jun 15, 2023 · 2 comments
Assignees

Comments

@jbpenrath
Copy link
Member

Problematic behavior

About Date Picker component, currently the date format is defined according to the browser language. In some cases, Cunningham consumers would like to be able to enforce date format.

Expected behavior

Cunningham consumers should be able to set date format input through a property.

@lebaudantoine
Copy link
Collaborator

lebaudantoine commented Jun 20, 2023

@jbpenrath Yes, do we agree that the custom date format should be used only for displaying the date in a particular format?

It is generally recommended to use ISO string format (such as "YYYY-MM-DD") when passing dates to and from components.

@lebaudantoine
Copy link
Collaborator

lebaudantoine commented Jun 20, 2023

It's natively not supported, I would need to add a custom mapping of date segments to override the existing ones, as this github answer.

Few questions:

  • Would you have some examples of custom date formats?
  • How would be editable a date as 23 janvier 2023? User would need to type a number for the month segment ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants