react-nice-dates icon indicating copy to clipboard operation
react-nice-dates copied to clipboard

Disabled days

Open filippos13 opened this issue 4 years ago • 1 comments

How can I disable specific days? For example the 1st, 23rd and 25th of a month? Is there any way I can disable specific days using an date array? Thank you

filippos13 avatar Aug 04 '21 08:08 filippos13

yes, check modifiers docs https://reactnicedates.hernansartorio.com/#api-reference something like this will work

modifiers={{
  disabled: (date: Date) => [1, 23, 25].includes(date.getDate()),
}}

ITernovtsii avatar Nov 24 '21 20:11 ITernovtsii