I use the calendar,
How can i set the previous days 'color:grey' and can't click?
You can disable dates using the min-date, max-date or disabled-dates properties.
You can find that in the docs.
i do not use the date-picker, only use the calendar.
i select days by the event dayclick.
it's my code
<calendar
:theme-styles='themeStyles'
:attributes='attrs'
:min-date="new Date()"
title-position="center"
show-caps
@update:frompage="pageChange"
@dayclick="dayclick"
>
</calendar>
the min-date,max-date or disable-dates only work in month ,the day also can click
You can change style with attributes option like below. But you need to handle click event by yourself.
{ dates: { start: null, end: new Date() }, contentStyle: { color: 'grey' }}
Thanks a lot,I think it's the best solution now.
@EricMcRay Thanks for the help there.
Most helpful comment
You can change style with attributes option like below. But you need to handle click event by yourself.