当绑定单元格的时候,设置日期下拉选择,会导致时间出现变化,如图片所示:
- $(document).ready(function () {
- var person = { name: 'Wang feng', birthday: Date() };
- var source = new GC.Spread.Sheets.Bindings.CellBindingSource(person);
- var spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"), { sheetCount: 1 });
- var sheet = spread.getActiveSheet();
- sheet.isPaintSuspended(true);
- sheet.setBindingPath(0, 0, 'name');
- sheet.setBindingPath(0, 1, 'birthday');
- sheet.setDataSource(source);
- sheet.setValue(0, 1, "DatePicker", ns.SheetArea.colHeader);
- sheet.getCell(0,1).cellType(new DatePickerCellType()).width(100).formatter("yyyy年MM月dd日");
- sheet.isPaintSuspended(false);
- });
复制代码
|