Skip to content

Datepicker Widget Utility functions: $.datepicker.regional[ "fr" ] is not defined by default #275

Open
@Chealer

Description

@Chealer

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions