From c37db90b2d495310ba9fdc4b944aaecde1f7c715 Mon Sep 17 00:00:00 2001 From: wenqi73 <1264578441@qq.com> Date: Thu, 17 Oct 2019 18:45:02 +0800 Subject: [PATCH] fix(module:date-picker): animation start after overlay open --- .../lib/calendar/calendar-input.component.ts | 2 +- components/date-picker/picker.component.html | 1 - components/date-picker/picker.component.ts | 15 +++++++++++++-- docs/i18n.zh-CN.md | 2 +- 4 files changed, 15 insertions(+), 5 deletions(-) diff --git a/components/date-picker/lib/calendar/calendar-input.component.ts b/components/date-picker/lib/calendar/calendar-input.component.ts index 39c6feb8011..5f0bbc95ae6 100644 --- a/components/date-picker/lib/calendar/calendar-input.component.ts +++ b/components/date-picker/lib/calendar/calendar-input.component.ts @@ -48,7 +48,7 @@ export class CalendarInputComponent implements OnInit { ngOnInit(): void { if (this.autoFocus) { - this.inputRef.nativeElement.focus(); + setTimeout(() => this.inputRef.nativeElement.focus()); } } diff --git a/components/date-picker/picker.component.html b/components/date-picker/picker.component.html index de39fcd54c6..b1d35e26dab 100644 --- a/components/date-picker/picker.component.html +++ b/components/date-picker/picker.component.html @@ -82,7 +82,6 @@