SMART datagrid v.1 > Classes > CellEditor
The type of input/out value in editor when the editing cell is DATETIME field.
The default type is "yyyy/MM/dd".
Defaults to null.
The type can have several components in "Date Time Format String;Date Time Maintenance;A.M.,P.M.;Default Year" types, and each component is separated by ';'.
(Except for the first component, others will be supported from v1.3.5.)
Section | Explanation | Example |
---|---|---|
Date Time Format | "Input/output format of date and time. It will be described in the table below." | "yyyy/MM/dd hh:mm:ss" |
Date Time Maintenance | When date or time is excluded from format string, if specify this value as 1, it will maintain the corresponding value of existing cell value. | "yyyy/MM/dd;1" |
A.M./P.M. | If a is contained in format string, they are the values of A.M. and P.M. which can be entered in the corresponding location. The default values are "am" and "pm" respectively. | "yyyy/MM/dd a hh:mm:ss" |
Default Year | The default year value which is added when the year value is less than 100. The default value is 2000. | "yyyy/MM/dd;;;1900" |
Value | Patterns | Explanation |
---|---|---|
Year | "yyyy", "yy" | If enter two-digit year, 2000 will be added. |
Month | "MM" | Two-digit month. |
Date | "dd" | Two-digit date. |
A.M./P.M. | "a" | "am" or "pm". If contain this string, the time should be less than 12. |
Hour | "hh" | Two-digit hour. |
Minute | "mm" | Two-digit minute. |
Second | "ss" | Two-digit second. |
Delimiter | ".", "/", "-", " " | Separate date and time. |
var columns = [{
name: "col1",
fieldName: "Date1",
editor: {
type: "date",
datetimeFormat: "yyyy.MM.dd"
},
....
}];
grid.setColumns(columns);