fix date
This commit is contained in:
@@ -395,6 +395,8 @@ function FacetedFilter({ value, onChange, options }: FacetedFilterProps) {
|
||||
|
||||
function ScheduledForInput({ value, onChange }) {
|
||||
const today = new Date()
|
||||
const tomorrow = new Date()
|
||||
tomorrow.setDate(today.getDate() + 1)
|
||||
const [open, { set }] = useToggle()
|
||||
const [selected, setDate] = useState<Date | undefined>(value)
|
||||
const displayValue = !selected
|
||||
@@ -437,7 +439,7 @@ function ScheduledForInput({ value, onChange }) {
|
||||
onChange?.(date)
|
||||
set(false)
|
||||
}}
|
||||
disabled={{ before: today }}
|
||||
disabled={{ before: tomorrow }}
|
||||
startMonth={new Date(today.getFullYear(), 0)}
|
||||
endMonth={new Date(today.getFullYear() + 3, 11)}
|
||||
captionLayout="dropdown"
|
||||
|
||||
Reference in New Issue
Block a user