Refactor: Update shadcn calendar component

This commit is contained in:
gpt-engineer-app[bot]
2025-10-11 23:43:11 +00:00
parent 52e50ebb5e
commit d89a259098
2 changed files with 18 additions and 7 deletions

View File

@@ -61,9 +61,7 @@ export function DatePicker({
disabled={disabled}
>
<CalendarIcon className="mr-2 h-4 w-4" />
<span className="truncate">
{date ? format(date, "PPP") : placeholder}
</span>
{date ? format(date, "PPP") : <span>{placeholder}</span>}
</Button>
</PopoverTrigger>
<PopoverContent className="w-auto p-0" align="start">
@@ -73,7 +71,7 @@ export function DatePicker({
onSelect={handleSelect}
disabled={getDisabledDates}
initialFocus
className="p-3 pointer-events-auto"
captionLayout="dropdown-buttons"
fromYear={fromYear}
toYear={toYear}
/>