jquery / jquery/api.jqueryui.com
Datepicker Widget Utility functions: $.datepicker.regional[ "fr" ] is not defined by default
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 73
- Forks
- 74
- PR merge metrics
- No merged PRs in 30d
Description
http://api.jqueryui.com/datepicker/ contains the following code example:
Set all date pickers to have French text.
1 $.datepicker.setDefaults( $.datepicker.regional[ "fr" ] );
In reality, this only works if $.datepicker.regional[ "fr" ] is defined, and defined to contain French texts. As explained in the Localization section (below), this typically involves loading an extra JS file.
Note that the files on jQuery's GitHub already call setDefaults, so for a French-only website, that call would be unneeded.
Also, the description is misleading; $.datepicker.regional[ "fr" ] contains options not limited to labels. For example, it sets dateFormat. I recommend either clarifying the effect or removing this example.
By the way, I wonder whether the Localization section shouldn't be above the Utility functions section, since by default, the widget is difficult to use unless all of the audience understands English.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Datepicker Widget Utility functions example and the Localization section on the linked API documentation page. Verify how $.datepicker.regional["fr"] is provided and what options it contains, then clarify or remove the example and assess whether the section order needs adjustment. Done means the documentation accurately explains the required localization file and regional options.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- jquery
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100