Docs
API
-
Config
- barHeight
-
bbar
- bbarHeight
-
buttons
- buttonsHeight
- cls
- defaults
- draggable
-
events
-
footer
- height
- id
- i18n
-
items
- column
-
data
- defaults
- disabled
- displayKey
- editable
- emptyText
- events
-
format
- itemCheckBox
- inputHeight
- inputLabel
- inputWidth
- label
- labelAlign
- labelWidth
- listItemTpl
- leftTpl
- leftWidth
- max
- min
- minListWidth
- multiSelect
- multiToggle
- name
- showPassTip
- spin
- step
- subSearch
- tabIndex
- tip
- type
- value
- valueKey
- vtype
- width
-
lang
-
date
- method
- modal
- params
- renderOuter
- renderTo
- scrollable
- shadow
-
subTitle
-
subTBar
- allowToggle
- action
- cls
- data
- disabled
- displayKey
- editable
- emptyText
- enableToggle
- events
- format
- handler
- hidden
- id
- imageCls
- inputHeight
- itemCheckBox
- leftTpl
- leftWidth
- max
- menu
- minListWidth
- multiSelect
- multiToggle
- paramsMenu
- paramsText
- pressed
- spin
- step
- subSearch
- text
- tip
- toggleGroup
- type
- valueKey
- vtype
- width
- subTBarHeight
-
tbar
- allowToggle
- action
- cls
- data
- disabled
- displayKey
- editable
- emptyText
- enableToggle
- events
- format
- handler
- hidden
- id
- imageCls
- inputHeight
- itemCheckBox
- leftTpl
- leftWidth
- max
- menu
- minListWidth
- multiSelect
- multiToggle
- paramsMenu
- paramsText
- pressed
- spin
- step
- subSearch
- text
- tip
- toggleGroup
- type
- valueKey
- vtype
- width
- tbarHeight
-
title
write
String
Formatting depends on localization. About localization read Localization
The main formatting field isdate
.
For that it is used properties:edit
,read
,write
.
Another extra property isinputFn
.
inputFn
formats displaying value.
inputFn
is used for almost all fields.Example: Date formatting
... items: [{ type: 'date', label: 'Birthday', name: 'birthday', emptyText: 'm.d.Y', format: { read: 'm.d.Y', write: 'm.d.Y', edit: 'm.d.Y' } ...
Example: inputFn
... items: [{ type: 'number', label: 'Salary', name: 'salary', emptyText: '$80,000', format: { inputFn: function salaryInputFn(value){ value = value.toString().replace('$', '').replace(/\,/g,'').replace('-', '').replace('.', ''); if(value.length === 0){ value = ''; } else if(value.length > 6){ value = value.substr(0, 6); value = '$' + value.replace(/\B(?=(\d{3})+(?!\d))/g, ','); } else{ value = '$' + value.replace(/\B(?=(\d{3})+(?!\d))/g, ','); } return value; } } ...
Default
'm/d/Y'
-
date