If use MaskCellEditor, you can limit user input format in various ways during the run time. Please refer to Edit Mask Overview page about the input format specified in MaskCellEditor.mask.
If insertMode is false, it will be edited in overwrite mode.
If fillFromEnd is true, the length of the cell value will be filled from the end when move the cell value to the editor.
If includeSeparators is true, Separators will be included when save the cell value.
If includeLiterals is true, Literals will be included when save the cell value.
If stripEnd is true, blanks at the end of the text will be removed when save the cell value.
If stripBegin is true, blanks at the beginning will be removed when save the cell value.
If stripInner is true, blanks in the middle will be removed when save the cell value.
If appropriately use the mask editor, you can use it as date, time and datetime input unit.
When display the editor or paste the cell value or external text to the editor, the text which does not fit the type of the corresponding location will be ignored and the next texts will be proceeded. Skip the formal literal character position.
In addition, if specify MaskCellEditor.fillFromEnd as true when get the cell value, it will fill from the end of the editor.
Mask editor does not handle the value of date type separately. You should appropriately use CellEditor.datatimeFormat and MaskCellEditor.unmaskCallback, etc. Basically, it will be handled automatically if specify CellEditor.datatimeFormat and MaskCellEditor.mask properties in the same pattern. In the example above, the three columns of the date type have been set as below.
{
// Since the default format of datetimeFormat is 'yyyy/MM/dd', you do not have to set it separately.
mask: "0000/00/00"
}
{
"mask": "00:00:00",
"datetimeFormat": "hh:mm:ss;1",
}
{
"mask": "0000/00/00 00:00:00",
"datetimeFormat": "yyyy/MM/dd hh:mm:ss",
// Make the space character between the date and time be transferred together.
// Since the default value of includeSeparators is true, time and date separators do not need to be set separately.
"includeLiterals": true
}