SMART datagrid v.1 > Classes > CellEditor

[ grids ver.1.3.5]   Back  Forward

DataLudi.CellEditor.datetimeFormat  property

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.

Getter
function datetimeFormat(): String
Setter
function setDatetimeFormat(value: String)

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.) 

Table-1  Type components
SectionExplanationExample
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 MaintenanceWhen 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 YearThe default year value which is added when the year value is less than 100. The default value is 2000."yyyy/MM/dd;;;1900"
Table-2  Format strings
ValuePatternsExplanation
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.
Code -1
    var columns = [{
        name: "col1",
        fieldName: "Date1",
        editor: {
            type: "date",
            datetimeFormat: "yyyy.MM.dd"
        },
        ....
    }];
    grid.setColumns(columns);
See Also
booleanFormat
Examples
Text Cell Editor