Skip to content
This repository has been archived by the owner on Apr 3, 2023. It is now read-only.

Reload disabled dates on left/right click #21

Closed
wants to merge 1 commit into from

Conversation

Bighamster
Copy link
Contributor

I would like to be able to arbitrarily change the disabled dates for any month. For example, disable all Mondays in May, and all Saturdays in June. For example, I want to disable all odd dates

  const reloadDisabled = dates => {
    const arr = [];

    for(let i=0, len=dates.length; i < len; i++) {
      if( i % 2 ) {
        arr.push(`${dates[i].getFullYear()}-${dates[i].getMonth() + 1}-${dates[i].getDate()}`);
      }
    }
    return arr;
  }

<Datepicker
    {reloadDisabled}
/>

image

@TIOvOIT TIOvOIT closed this Jul 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants