Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
* last day | valid dates | first day
*
* - last day of the month < `minTime` - entire month should be disabled
* - first day of the month > `maxTime` - entire month should be disabled
*/
if (lastDayOfMonthTime < minTime || +firstDayOfMonth > maxTime) {
return {
key,
calendar: null,
disabledDatesSet: null,
disabledDaysSet: null,
};
}
const calendarDays = calendar({
dayFormat,
fullDateFormat,
locale,
disabledDates,
disabledDays,
firstDayOfWeek,
max,
min,
showWeekNumber,
weekLabel,
weekNumberType,
selectedDate: firstDayOfMonth,
});
return { ...calendarDays, key };
});