Skip to content

Field date

The field is used to select a date and handles time in ISO format.

Params

placeholder Optional

  • Type: string String label, displayed when there is no data in the field.

mask Optional

  • Type: string.
  • By default: YYYY/MM/DD.

The mask sets the date display format. The mask can consist of characters of any character, however keywords are Y, M, D, H and h. The corresponding values will be substituted for their position.


Also, all parameters common to all FormField. Information about them can be found on this page.

Values

The field value is a string corresponding to the simplified extended ISO format (ISO 8601).

Specification

  • The field is available when using Tab and Shift + Tab.
  • Date entry is possible using the input field.
  • An additional controller is available for date selection: calendar.
  • The calendar should not be available for Tab or Shift + Tab.
  • Blocking fields cancels navigation using Tab. There is also a change in the style of date.
  • If the validation fails, the field should change the date style.

Examples

There are no additional-required parameters for this field, so we need to specify only type and name:

html
<form-field name = "created" type="date"/>
<form-field name = "created" type="date"/>
ts
import {FormField} from "jenesius-vue-form";
import {FormField} from "jenesius-vue-form";

Default field:

Created date

YYYY/MM/DD


In locked state:

Disabled

YYYY/MM/DD


Field not validated:

With an errors

YYYY/MM/DD

Seleact this fields


Changed value of mask:

With new mask

YYYY_MM



The current state of the form:

ts
{}
{}

Released under the MIT License.