v7.3.0

DateTimeField
Widget

A composite field that combines a DateField and a TimeField into a single input for selecting both date and time. The two sub-fields can be individually configured via dateField and timeField. The field's value is a Date object representing the combined selection. This field can be used as a cell editor in a Grid.

const dateTimeField = new DateTimeField({
    label : 'Start',
    value : new Date(2025, 0, 15, 9, 30),
    appendTo : document.body
});

Useful configs and properties

Config Description
value The combined date and time value
dateField Configuration for the embedded DateField
timeField Configuration for the embedded TimeField
weekStartDay First day of the week (0=Sunday, 1=Monday, etc.)
label Field label displayed beside the field

See also

Input configuration properties (such as inputWidth, inputAlign, autoComplete, inputAttributes, inputType, spellCheck, tabIndex, and validateOnInput) cannot be set directly on DateTimeField. Instead, configure them individually on the underlying dateField and timeField configuration objects.

No results

Configs

Configs are options you supply in a configuration object when creating an instance of this class

Properties

Properties are getters/setters or publicly accessible variables on this class
  • dateField : DateField
    READONLY

    Returns the DateField instance

    Has a corresponding dateField config.

  • timeField : TimeField
    READONLY

    Returns the TimeField instance

    Has a corresponding timeField config.

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

Functions

Functions are methods available for calling on the class
    type: datetimefield

    Source path

    Core/widget/DateTimeField.js

    Contents