[Feature Request][input-date] add localized datemasks #90
Replies: 9 comments
-
I believe that bug is in the error message. It should clearly say that the expected format is The reason you have an US format is because you are using a shorthand locale We are going to eventually deprecate shorthand locales btw, exactly because of issues like this. |
Beta Was this translation helpful? Give feedback.
-
Can we use |
Beta Was this translation helpful? Give feedback.
-
@CarloCanlas yes, you need Some insights about the localisation system design are documented here. |
Beta Was this translation helpful? Give feedback.
-
While we now support en-PH, this issue is a different thing and also needs a fix. This happens due to the fact that the platform's Intl uses the format We have a few options to fix it:
I personally like the solution 3, because it will remove the burden of hardcoding all these values in our translations. At the same time this will be fixed as a side effect of solution 1 if we implement it soon. |
Beta Was this translation helpful? Give feedback.
-
For completeness, this was the poc @bashmish was referring to: https://github.com/ing-bank/lion/tree/poc/localized-datemasks
Keep in mind it is just a poc and it should be tackled in an improvement story of the Validation System later |
Beta Was this translation helpful? Give feedback.
-
I updated the description and the title of this issue to reflect the agreement of our team regarding the proper fix for this. |
Beta Was this translation helpful? Give feedback.
-
Hi, since this will be fixed when we fix #187 , I am closing this one as a duplicate of that issue. |
Beta Was this translation helpful? Give feedback.
-
Reopening as a feature enhancements for localized datemasks |
Beta Was this translation helpful? Give feedback.
-
Hi, We are closing this issue because we're changing the way we handle feature requests. Your issue will get the "votes needed" label, and people can add 👍 reactions to vote and show interest. It will be reopened when this feature gets picked up. This we way we clearly focus on bugs in our open issues. At the same time we can see what community interest there is for new features. Thanks! |
Beta Was this translation helpful? Give feedback.
-
lion-date
has a validation message that saysPlease enter a valid date (DD/MM/YYYY).
but is checking forMM/DD/YYYY
. The localisation that we are using isen
. Thanks!Short-term solution (done)
Use a specific dialect, e.g.
en-PH
in this case, with a proper date format in translations.Long-term solution (to be implemented)
We should stop hardcoding date format in validation messages and dynamically set it based on the locale value. We can provide a special variable in the context of validators translations.
@tlouisse has a POC:
https://github.com/ing-bank/lion/tree/poc/localized-datemasks
Beta Was this translation helpful? Give feedback.
All reactions