How can i add multiple blocked dates color in Reactjs airbnb calendar api?
ex:
You can use renderDayContents method. For example:
<DateRangePicker
renderDayContents={(day) => {
if (day.format('DD-MM') === '19-07')
return <td className={classes.specialHoliday}>{day.format('DD')}</td>;
if (day.format('DD-MM') === '18-07')
return <td className={classes.unavailable}>{day.format('DD')}</td>;
if (day.format('DD-MM') === '20-07')
return (
<td className={classes.specialNonWorkingHoliday}>
{day.format('DD')}
</td>
);
return <td>{day.format('DD')}</td>;
}}
..........
/>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.