diff --git a/components/date-picker-view/date-picker-view.component.ts b/components/date-picker-view/date-picker-view.component.ts index 661c8e7a..b0f4b7e0 100644 --- a/components/date-picker-view/date-picker-view.component.ts +++ b/components/date-picker-view/date-picker-view.component.ts @@ -105,10 +105,12 @@ export class DatePickerViewComponent extends DatePickerComponent implements OnIn this.options.onValueChange = this.onValueChange; this.checkMode(this.options.mode); const value = this.transformDateFormat(this.options.value).split('-'); - if (value.length > 0) { - this.currentTime = value.map(item => { + if (value.length > 1) { + this.current_time = this.currentTime = value.map(item => { return parseInt(item, 0); }); + } else { + this.currentTime = this.current_time; } }