mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-17 16:24:25 +08:00
redesign time picker in date time select for desktop device
This commit is contained in:
@@ -48,6 +48,22 @@ export function getCssValue(element: HTMLElement | null, name: string): string {
|
||||
return computedStyle.getPropertyValue(name);
|
||||
}
|
||||
|
||||
export function setChildInputFocus(parentEl: HTMLElement | undefined, childSelector: string): void {
|
||||
if (!parentEl) {
|
||||
return;
|
||||
}
|
||||
|
||||
const childElement = parentEl.querySelector(childSelector);
|
||||
|
||||
if (!childElement || !(childElement as HTMLInputElement)) {
|
||||
return;
|
||||
}
|
||||
|
||||
const childInput = (childElement as HTMLInputElement);
|
||||
childInput.focus();
|
||||
childInput.select();
|
||||
}
|
||||
|
||||
export function scrollToSelectedItem(parentEl: HTMLElement | null | undefined, containerSelector: string | null, selectedItemSelector: string): void {
|
||||
if (!parentEl) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user