redesign time picker in date time select for desktop device

This commit is contained in:
MaysWind
2025-07-31 22:19:12 +08:00
parent d41a2141a7
commit b24ebdb83e
4 changed files with 424 additions and 111 deletions
+16
View File
@@ -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;