How the date selection component of antd forbids selectable dates

clipboard.png

clipboard.png
my aim is to ban the date before today and the date after 7 days, that is, I can only choose the time in the next seven days. My code can only be banned after seven days. How can I get rid of the date before today?


    public disableDate = (currentDate: moment.Moment) => {
        return (
            currentDate &&
            (currentDate < moment(Date.now()).add(-1, 'd') || currentDate > moment(Date.now()).add(7, 'd'))
        );
    };
Menu