【发布时间】:2018-04-20 15:48:29
【问题描述】:
我有一个网格,我将列编辑器设置为 [editor]="'date'",现在当我尝试编辑单元格时它会抛出错误。我收到以下错误。 json 日期看起来像一个 ISO 格式的日期,我认为这可能是问题,但我不知道如何解决它。
{"Date":"2016-12-14T00:00:00"}
ERROR TypeError: date.getTime is not a function
at Object.exports.cloneDate (clone-date.js:15)
at DatePickerComponent.writeValue (datepicker.component.js:295)
at setUpControl (shared.ts:57)
at FormControlDirective.ngOnChanges (form_control_directive.ts:107)
at checkAndUpdateDirectiveInline (provider.ts:276)
at checkAndUpdateNodeInline (view.ts:519)
at checkAndUpdateNode (view.ts:462)
at debugCheckAndUpdateNode (services.ts:389)
at debugCheckDirectivesFn (services.ts:476)
at Object.eval [as updateDirectives] (CellComponent.html:17)
【问题讨论】: