<DatePicker selected={Filters.from} maxDate={new Date()} // add this in your date componet onChange={(date) => setFilters((prev) => ({ ...prev, from: date, })) } />