Initialization Option Author API

dateTimeLocale

Automatically localizes dates and times.

You would want to use this to perform fine grained customization of the date and time display format.

Examples

// Set the date and time language format to French
var initializationOptions = {
    "config": {
        "label_bundle": {
            "dateTimeLocale": "fr"
        }
    }
};

Values

Request object key config.label_bundle.dateTimeLocale

Default: ""

Type string

This value is processed using Moment.js.

The default is an empty string, which Moment.js interprets as "en-US".

To set the language to French, for example, you can pass in "fr".

To set the region and language to Canadian French, for example, you can pass in "fr-CA".

Was this article helpful?