fix(web): 修复弹窗裁切/宽度与日期选择器
This commit is contained in:
@@ -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}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user