'UI Kitten calendar future years disabled

Does anyone understand why the UI Kitten Calendar component is only enabled for the current year? It's 2021 now and when I try to select a day from future or past years in the demo live view for "Simple Usage", they are disabled..



Solution 1:[1]

it looks like there are 2 props startDate and endDate props you can specify like this

export interface CalendarRange<D> {
  startDate?: D;
  endDate?: D;
}
<Calendar
  date={date}
  onSelect={nextDate => setDate(nextDate)}
  endDate={endDate} <------ add this
/>

for the value of endDate I think you can have a look at How to properly add 1 month from now to current date in moment.js because KittenUI calendar is using moment.js.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 David Leuliette