text type date editor
When field.dataType = 'datetime' is set, the grid manages data as a date object. If the value stored in the grid is returned as 'Wed Jul 03 1996 00:00:00 GMT+0900 (Korea Standard Time)' and it is inconvenient to use, You must use it by converting it to text with Date.toLocaleString() or format it with dataProvider.getOutputRow().
If you want to return the value as the imported text, you must set field.dataType = 'text' instead of field.dataType = 'datetime'.
caution
Because it is managed as text, any text other than the date can be pasted when copying/pasting. Be careful when using text as additional verification code for the field may be required when saving.
We recommend using field.dataType = 'datetime'. See the date editor in the default editor
var fields = [
{
"fieldName": "dateTime1",
"dataType": "text"
},
{
"fieldName": "dateTime2",
"dataType": "text"
}
];
var columns = [
{
"name": "dateTime1",
"fieldName": "dateTime1",
"width": "130",
"header": {
"text": "Data from yyyy-MM-dd"
},
"editor": {
"type": "date",
"datetimeFormat": "yyyy-MM-dd",
"textReadOnly": true,
"mask": {
"editMask": "9999-99-99",
"includedFormat": true
}
}
},
{
"name": "dateTime2",
"fieldName": "dateTime2",
"width": "130",
"header": {
"text": "Data from yyyyMMdd"
},
"editor": {
"type": "date",
"datetimeFormat": "yyyyMMdd",
"textReadOnly": true,
"mask": {
"editMask": "9999-99-99"
}
},
"textFormat": "([0-9]{4})([0-9]{2})([0-9]{2})$;$1-$2-$3",
}
];