date

Date field type

Example


items: [{
  type: 'date',
  label: 'Birthday',
  name: 'birthday'

Properties

events

Array

Set event handler to field.


...
items: [{
  type: 'date',
  label: 'Birthday',
  name: 'birthday'
  events: [{
    change: function(){
      
    }
  }]
},{
...

format

Mixed

Formatting.


{
  label: 'Birthday',
  name: 'birthday',
  value: item.birthday,
  format: {
    read: 'Y.m.d',
    write: 'Y.m.d',
    edit: 'd.m.Y'
  },
  type: 'date'
}

label

String

Text of field.


...
items: [{
  type: 'date',
  label: 'Birthday',
  name: 'birthday'
},{
...

labelAlign

String

Align of label.

Values: right, left, top.


...
items: [{
  type: 'date',
  label: 'Birthday',
  name: 'birthday'
  labelAlign: 'right'
},{
...
left

name

String

Name of field over which it is possible to get value of field.


...
items: [{
  type: 'date',
  label: 'Birthday',
  name: 'birthday'
},{
...

type

String

Type of field (value - date).


{
  type: 'date',
  label: 'Birthday',
  name: 'birthday'
}

value

Date

Value of field.


items: [{
  type: 'date',
  label: 'Birthday',
  name: 'birthday',
  value: new Date()
...

Events

change

(field, value)

Value of field.


items: [{
  type: 'date',
  label: 'Birthday',
  name: 'birthday',
  events: [{
    change: function(){
      
    },
    scope: {}//not required
  }]
...