createInstance

Commons
stable

Instantiates a reactive date adapter from the given IDateOptions and locale instance. The adapter locale is kept in sync with the active locale via a watcher.

API

Signature

Signature TypeScript complète, extraite du fichier util.

typescript

API

Paramètres

Paramètres d'entrée acceptés par cet util.

options
requis
IDateOptions
Date configuration: adapter class or pre-built adapter, locale map, and custom formats.
locale
requis
ILocaleInstance
The active origam locale instance, used to set and reactively update the adapter locale.

API

Valeur de retour

La valeur retournée par cet util.

A reactive date adapter that automatically switches locale when the app locale changes.

Usage

Exemples

Extraits de code prêts à coller.

Provide a date adapter to the app

typescript