Skip to main content

Date

What is the Form Date?

The Date or Date picker is used, as the name suggests, as a date-picking field, which can be styled to your preference.

date.png datepopup.png

Options

Specifies where the date-picking pop-up appears relative to the input field. The pop-up is always left-aligned to the field. Values: Bottom (default), Top.

Setting Mock Field and Own Value

The Date picker exports its own value (the selected date string) and the mock field only while running in the displayer; in the editor the export is skipped. This happens:

  • When the Date picker is rendered (the initial value from the datasource, or today's date when Set today as default is enabled).
  • When the input field loses focus (blur), for example after a date is selected and the pop-up closes.
  • When an external message tells it to.

Validation

The Date picker doesn't validate itself.

Sensor Events

The Date picker doesn't validate, so it never emits a {FORM-NAME}-valid sensor event. Whenever the value is exported it triggers a value sensor event named after the field ({FORM-NAME}) carrying the selected date, unless the export was requested silently (by a Reset or Clear command).

External Messages

The Date picker listens to all the basic messages.

  • Set Form: Takes the message's value parameter (which must be a string), sets it as the selected date, saves it to the mock, and updates the own value. Note: the value should match the configured date format. If it does not, setting the date can produce an undesired outcome.
  • Clear / Reset Form: Both clear the selection to empty and update the mock and own value. When the framework requests the update silently, no value sensor event is fired.

Value from Datasource

The Date picker does not bind an external input datasource to generate its content. When the widget is connected to a form output datasource that already holds a value for this field, that value is loaded as the initially selected date on render. If no stored value exists and Set today as default is enabled, today's date is selected instead.