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