this._is_string = value && typeof value == “string”;
when value is empty, such as value = ‘’, then this._is_string is false?!
this._is_string = value && typeof value == “string”;
when value is empty, such as value = ‘’, then this._is_string is false?!
While it may be not the best code, It is actually valid
The code of component checks that value of current cell is defined, and if value was not defined then component uses empty string. It allows to prevent “undefined” values in different editors.
In case of date editor it means that both empty string or undefined will be converted to “” before calling setValue of date editor. And inside of setValue we can’t be sure is current column has string values or Date values.
You can subclass date editor
webix.editors.stringdate = webix.extend({
setValue:function(value){
webix.editors.popup.setValue.call(this, value);
},
getValue:function(){
return this.getInputNode().getValue(webix.i18n.parseFormatStr)||"";
}
}, webix.editors.date);
OK, thanks for your solution.