又尝试了一下easyUI中日历上的的 onSelect 事件
在SpreadJs的容器外是能正常取到日期 但是在activateEditor这个事件中对应方法绑定的话就不会触发
DatePickerCellType.prototype.activateEditor = function (editorContext, cellStyle, cellRect) {
//Initialize input editor.
if (editorContext) {
$editor = $(editorContext);
GC.Spread.Sheets.CellTypes.Base.prototype.activateEditor.apply(this, arguments);
//$editor.datepicker();
//$editor.css("position", "absolute");
//$editor.attr("gcUIElement", "gcEditingInput");
//$(".ui-datepicker").attr("gcUIElement", "gcEditingInput");
$editor.attr("class", "easyui-datebox");
$editor.datebox({
//required:true,
onSelect:function(date){
alert(date.getFullYear()+":"+(date.getMonth()+1)+":"+date.getDate());
}
});
}
} |