Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
this.setState(prevState => ({
departDate,
returnDate: dateToBoundaries(
prevState.returnDate,
departDate,
this.maxDate,
),
}));
action('Selected departure date')(departDate);
this.setState(prevState => ({
returnDate,
departDate: dateToBoundaries(
prevState.departDate,
this.minDate,
returnDate,
),
}));
action('Selected return date')(returnDate);