v7.3.0

TimeField
Widget

The time field widget is a text input field with a time picker drop down. It shows left/right arrows to increase or decrease time by the step value.

This field can be used as an editor for the Column. It is used as the default editor for the TimeColumn.

Configuring forward / backward step size

The step configuration controls how the time value changes when using the forward and backward buttons at the start and end of the field. The step value is also used to configure the appropriate picker:

  • For steps in minutes (e.g. '5m'), the minute picker will use this step value
  • For steps in hours (e.g. '2h'), the hour picker will use this step value
new TimeField({
    label     : 'Time field',
    appendTo  : document.body,
    step      : '5 minutes'  // Controls both field buttons and minute picker
});

This widget may be operated using the keyboard. ArrowDown opens the time picker, which itself is keyboard navigable. Shift+ArrowDown activates the step back trigger. Shift+ArrowUp activates the step forwards trigger.

let field = new TimeField({
  format: 'HH'
});

Salesforce users will not see this form of the TimeField and picker because this uses custom elements which are not supported in Salesforce. Instead, the last released version of the 6.0.0 TimePicker is used. The public API is not changed.

No results

Configs

Configs are options you supply in a configuration object when creating an instance of this class
  • Format for date displayed in field (see Core.helper.DateHelper#function-format-static for formatting options).

    Has a corresponding runtime format property.

  • Set to true to not clean up the date part of the passed value. Set to false to reset the date part to January 1st

    Has a corresponding runtime keepDate property.

  • Max time value

    Has a corresponding runtime max property.

  • Min time value

    Has a corresponding runtime min property.

  • Time increment duration value. Defaults to 5 minutes. The value is taken to be a string consisting of the numeric magnitude and the units. The units may be a recognised unit abbreviation of this locale or the full local unit name. For example "10m" or "5min" or "2 hours"

    Has a corresponding runtime step property.

  • Set to false to hide the forward and backward time step triggers.

  • Widgets that trigger functionality upon click. Each trigger icon is a Widget instance which may be hidden, shown and observed and styled just like any other widget.

    Has a corresponding runtime triggers property.

  • Value, which can be a Date or a string. If a string is specified, it will be converted using the specified format.

    When converted to a Date, the date part is set to January 1st of the year 2020.

    Has a corresponding runtime value property.

Properties

Properties are getters/setters or publicly accessible variables on this class
  • Get/Set format for time displayed in field (see format for formatting options).

    Has a corresponding format config.

  • Set to true to not clean up the date part of the passed value. Set to false to reset the date part to January 1st

    Has a corresponding keepDate config.

  • Get/set max value, which can be a Date or a string. If a string is specified, it will be converted using the specified format.

    Has a corresponding max config.

  • Get/set min value, which can be a Date or a string. If a string is specified, it will be converted using the specified format.

    Has a corresponding min config.

  • Get/set value, which can be a Date or a string. If a string is specified, it will be converted using the specified format.

    This value is a Date object. As such it contains the date part. When set using a string, the date part is set to January 1st of the year 2020.

    Has a corresponding value config.

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

Functions

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

    Source path

    Core/widget/TimeField.js

    Contents