We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow to optionally automatically focus the date input field on panel open.
This would allow quick editing.
The proposed implementation uses "document.querySelector" which probably you would like to avoid.
@Input() @InputBoolean() calInputAutoFocus: boolean; @ViewChild('datepicker') datepicker: NzDatePickerComponent; ngOnInit() { if (calInputAutoFocus) { this.subscribeInputFocus(); } } private subscribeInputFocus(): Subscription { return this.datepicker.nzOnOpenChange.subscribe((open: boolean) => { if (open) { setTimeout(() => { const calInput = document.querySelector( 'calendar-input input.ant-calendar-input' ) as HTMLInputElement; calInput.focus(); }); } }); }
The text was updated successfully, but these errors were encountered:
This would be great!
Sorry, something went wrong.
wenqi73
No branches or pull requests
What problem does this feature solve?
Allow to optionally automatically focus the date input field on panel open.
This would allow quick editing.
The proposed implementation uses "document.querySelector" which probably you would like to avoid.
What does the proposed API look like?
The text was updated successfully, but these errors were encountered: