Update date-picker.tsx

This commit is contained in:
g
2025-11-28 18:33:23 +00:00
parent b10b2f2701
commit 4e5fc1901c

View File

@@ -126,17 +126,15 @@ export function MonthPicker({ selectedMonth, onMonthChange, placeholder = "Pick
<CalendarIcon className="mr-2 h-4 w-4" />
{formatSelectedMonth(selectedMonth)}
{selectedMonth && (
<Button
variant="ghost"
size="sm"
className="ml-auto h-6 w-6 p-0 hover:bg-transparent"
<div
className="ml-auto h-6 w-6 p-0 flex items-center justify-center rounded-sm hover:bg-accent cursor-pointer"
onClick={(e) => {
e.stopPropagation()
onMonthChange?.(undefined)
}}
>
<X className="h-3 w-3" />
</Button>
</div>
)}
</Button>
</PopoverTrigger>
@@ -272,17 +270,15 @@ export function DateRangePicker({
<CalendarIcon className="mr-2 h-4 w-4" />
{formatDateRange(dateRange)}
{dateRange?.from && (
<Button
variant="ghost"
size="sm"
className="ml-auto h-6 w-6 p-0 hover:bg-transparent"
<div
className="ml-auto h-6 w-6 p-0 flex items-center justify-center rounded-sm hover:bg-accent cursor-pointer"
onClick={(e) => {
e.stopPropagation()
handleClear()
}}
>
<X className="h-3 w-3" />
</Button>
</div>
)}
</Button>
</PopoverTrigger>