fix(web): 修复弹窗裁切/宽度与日期选择器

This commit is contained in:
clz
2026-01-18 20:17:48 +08:00
parent f5afb0c135
commit c61691249f
9 changed files with 40 additions and 41 deletions

View File

@@ -18,7 +18,7 @@
let { startDate = $bindable(), endDate = $bindable(), onchange, class: className }: Props = $props();
// 将 YYYY-MM-DD 字符串转换为 CalendarDate
function parseDate(dateStr: string): DateValue | undefined {
function parseDate(dateStr?: string): DateValue | undefined {
if (!dateStr) return undefined;
const [year, month, day] = dateStr.split('-').map(Number);
return new CalendarDate(year, month, day);
@@ -101,7 +101,11 @@
<Popover.Content class="w-auto p-0" align="start">
<RangeCalendar
bind:value
class="rounded-md border"
numberOfMonths={2}
pagedNavigation={true}
fixedWeeks={true}
weekdayFormat="short"
locale="zh-CN"
weekStartsOn={1}
/>