New to KendoReactStart a free 30-day trial

Parsing and Formatting of Dates and Numbers

The KendoReact Internationalization package utilizes the Kendo UI Internationalization modules for date and number parsing and formatting, and builds on top of them to adapt them to the React context.

For more information on parsing and formatting date and number options, refer to the kendo-intl GitHub repository.

Modules for Date and Number Operations

The available internationalization methods are based on the Unicode Common Locale Data Repository (CLDR) data and are split into the following modules:

Using CLDR-JSON Data

When you parse and format dates and numbers for a locale that is different from the default en-US one, you have to load CLDR data.

As a data reference for all locales, the following examples use the cldr-core, cldr-numbers-full, and cldr-dates-full packages.

  1. Install the needed CLDR packages by running the following command:

    sh
    npm i cldr-core cldr-numbers-full cldr-dates-full
  2. Import and load the required files in your component from the following locations:

    • cldr-core/supplemental/LOCALE_FILE.json
    • cldr-PACKAGE_NAME/main/LOCALE_NAME/LOCALE_FILE.json

You can also import the data from the cldr-data package at the cldr-data/main/LOCALE_NAME/LOCALE_FILE.json location.

Date Parsing

Date parsing converts a string into a Date object by using the specific settings of the locale. For more information on date parsing, refer to the kendo-intl Date Parsing section.

Change Theme
Theme
Loading ...

Date Formatting

Date formatting converts a Date object into a human-readable string by using the specific settings of the locale. For more information on date formatting, refer to the kendo-intl Date Formatting section.

Change Theme
Theme
Loading ...

Number Parsing

Number parsing converts a string into a Number object by using the specific settings of the locale. For more information on number parsing, refer to the kendo-intl Number Parsing section.

Change Theme
Theme
Loading ...

Number Formatting

Number formatting converts a Number object into a human-readable string using the specific settings of the locale. For more information on number formatting, refer to the kendo-intl Number Formatting section.

Change Theme
Theme
Loading ...

General Formatting

General formatting provides methods for independent placeholder and type formatting by using the specific settings of the locale. For more information on general formatting, refer to the kendo-intl General Formatting section.

Change Theme
Theme
Loading ...