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

New format date suggestion dd/mm/yyyy #672

Open
arsen26 opened this issue Nov 15, 2024 · 1 comment
Open

New format date suggestion dd/mm/yyyy #672

arsen26 opened this issue Nov 15, 2024 · 1 comment

Comments

@arsen26
Copy link

arsen26 commented Nov 15, 2024

Currently, component supports a variety of formats, but they lack native support for commonly used formats such as day/month/year (DD/MM/YYYY) , day/month/year hours:minutes (DD/MM/YYYY HH:MM) hours:minutes:seconds DD/MM/YYYY HH:MM:SS) format. Additionally, the format options section does not include a way to retrieve the month as a number, which limits flexibility when formatting dates.

These formats are widely used in many countries, particularly in Europe, and their absence creates extra work for developers who need to implement custom formatting logic. Including these formats and the ability to represent the month as a number would significantly enhance usability and streamline the development process for applications targeting these regions.

@dmtrKovalenko
Copy link
Owner

We are specifically not exposing custom format dates as a a string or something like that because it is close to impossible to unify across the libraries but as well it is generally a bad practice because Americans may be confused when you use dd/mm/yyyy and Europeans will be confused by American date format vice versa

Instead, we expose the localized versions of the date format that abstract same input but in a more localized manner. So in your case, you should use

  keyboardDate: TLibFormatToken;
  /** Localized keyboard input friendly date/time format @example "02/13/2020 23:44" */
  keyboardDateTime: TLibFormatToken;

this will do the trick

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

No branches or pull requests

2 participants