feat: establish shared calendar range selection foundation
This commit is contained in:
@@ -191,7 +191,7 @@ export const CalendarYearPickerGrid = defineComponent({
|
||||
}).format(date.toDate("UTC"));
|
||||
function measure() {
|
||||
const grid = ctx.root.value?.querySelector<HTMLElement>(
|
||||
'[data-slot="calendar-grid"]',
|
||||
`[data-slot="${ctx.prefix}-grid"]`,
|
||||
);
|
||||
if (grid) {
|
||||
top.value = grid.offsetTop;
|
||||
@@ -206,7 +206,9 @@ export const CalendarYearPickerGrid = defineComponent({
|
||||
cell?.scrollIntoView?.({ block: "nearest" });
|
||||
}
|
||||
const rootGrid = computed(() =>
|
||||
ctx.root.value?.querySelector<HTMLElement>('[data-slot="calendar-grid"]'),
|
||||
ctx.root.value?.querySelector<HTMLElement>(
|
||||
`[data-slot="${ctx.prefix}-grid"]`,
|
||||
),
|
||||
);
|
||||
useResizeObserver(rootGrid, measure);
|
||||
onMounted(measure);
|
||||
|
||||
Reference in New Issue
Block a user