v7.3.0

DateColumn

A column that displays a date in the specified format. By default L format is used, which contains the following info: full year, 2-digit month, and 2-digit day. Depending on the browser locale, the formatted date might look different. Intl.DateTimeFormat API is used to format the date. Here is an example of possible outputs depending on the browser locale:

// These options represent `L` format
const options = { year : 'numeric', month : '2-digit', day : '2-digit' };

new Intl.DateTimeFormat('en-US', options).format(new Date(2021, 6, 1)); // "07/01/2021" new Intl.DateTimeFormat('ru-RU', options).format(new Date(2021, 6, 1)); // "01.07.2021"

// Formatting using Bryntum API LocaleManager.applyLocale('En'); DateHelper.format(new Date(2021, 6, 1), 'L'); // "07/01/2021" LocaleManager.applyLocale('Ru'); DateHelper.format(new Date(2021, 6, 1), 'L'); // "01.07.2021"

To learn more about available formats check out DateHelper docs.

The field this column reads data from should be a type of date.

Default editor is a DateField.

new Grid({
    columns : [
         { type: 'date', text: 'Start date', format: 'YYYY-MM-DD', field: 'start' }
    ]
});

Useful configs

Config Description
format Date display format string
min Minimum selectable date
max Maximum selectable date
step Date picker step unit and amount

See also

No results

Configs

Configs are options you supply in a configuration object when creating an instance of this class
  • The name of the data model date field to read data from.

    Has a corresponding runtime field property.

  • Time increment duration value to apply when clicking the left / right trigger icons. See step for more information Set to null to hide the step triggers.

    Has a corresponding runtime step property.

  • Max value for the cell editor

    Has a corresponding runtime max property.

  • Min value for the cell editor

    Has a corresponding runtime min property.

Properties

Properties are getters/setters or publicly accessible variables on this class
  • The name of the data model date field to read data from.

    Has a corresponding field config.

  • Time increment duration value to apply when clicking the left / right trigger icons. See step for more information Set to null to hide the step triggers.

    Has a corresponding step config.

  • Max value for the cell editor

    Has a corresponding max config.

  • Min value for the cell editor

    Has a corresponding min config.

  • isDateColumn : Booleantrue
    READONLY
    ADVANCED
    Identifies an object as an instance of DateColumn class, or subclass thereof.

Functions

Functions are methods available for calling on the class
    • defaultRenderer( )
      private

      Renderer that displays the date with the specified format. Also adds cls 'date-cell' to the cell.

    • groupRenderer( )
      private

      Group renderer that displays the date with the specified format.

    type: date

    Source path

    Grid/column/DateColumn.js

    Contents