Patric
Jun 15, 2021

--

Thanks for that interesting question. I implemented a possible solution for this in a new branch here https://github.com/pguso/stencil-calendar/tree/disable-before-today

I added a new function disableBeforeToday() that checks if the day that would be added to the calendar is before today and if so it returns true and and in the JSX part i extended the condition with the isDisabled check

if ((index < this.fillStartCount || index >= this.fillEndCount) || isDisabled)

--

--

Patric
Patric

Written by Patric

Loving web development and learning something new. Always curious about new tools and ideas.

Responses (1)