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?
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'))
);
};
form verification needs to send a request to the background for uniqueness verification and real-time verification. the current solution is to send a request in the onBlur of input. but the experience is not good. Every time onBlur, the page will fl...