Update date-picker.tsx
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user