iamkun / iamkun/dayjs

Feature request: add a way to provide a placeholder of the localized format

Open
#2,111 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
48.7k
Forks
2.5k
PR merge metrics
No merged PRs in 30d

Description

I am using the localized format plugin to display dates using `L` which in English Locale is `MM/DD/YYYY`. Is there a way to get that placeholder to display in the datepicker? For example I would like that to switch to `DD/MM/YYYY` if someone is using our app in Denmark.

Not sure if this is a thing already or if someone could point me in the right direction.

In moment it looks like they have something to solve this https://stackoverflow.com/questions/37036929/how-to-get-date-format-from-locale

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the localized format plugin and how locale data is exposed for the `L` token. Compare the requested behavior with the linked Moment.js example and determine an API for retrieving a locale-specific placeholder, including the Denmark `DD/MM/YYYY` case. Done means the localized format can provide a usable placeholder and the behavior is covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
localization
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.