Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
reopenPickerOnClearDates={true}
screenReaderInputMessage="arial-test"
withFullScreenPortal={true}
onFocusChange={arg => {}}
onNextMonthClick={e => {}}
onPrevMonthClick={e => {}}
numberOfMonths={2}
orientation="horizontal"
monthFormat="MM"
renderDay={day => day.toString()}
/>
}
}
const isInclusivelyAfterDayResult: boolean = isInclusivelyAfterDay(moment(),moment());
const isInclusivelyBeforeDayResult: boolean = isInclusivelyBeforeDay(moment(),moment());
const isNextDayDayResult: boolean = isNextDay(moment(),moment());
const isSameDayResult: boolean = isSameDay(moment(),moment());
const toISODateStringResult: string | null = toISODateString(moment(), "dd.mm.yyyy");
const toLocalizedDateStringResult: string | null = toLocalizedDateString(moment(), "dd.mm.yyyy");
const toMomentObjectResult: moment.Moment | null = toMomentObject(moment(), "dd.mm.yyyy");
/>
}
}
const isInclusivelyAfterDayResult: boolean = isInclusivelyAfterDay(moment(),moment());
const isInclusivelyBeforeDayResult: boolean = isInclusivelyBeforeDay(moment(),moment());
const isNextDayDayResult: boolean = isNextDay(moment(),moment());
const isSameDayResult: boolean = isSameDay(moment(),moment());
const toISODateStringResult: string | null = toISODateString(moment(), "dd.mm.yyyy");
const toLocalizedDateStringResult: string | null = toLocalizedDateString(moment(), "dd.mm.yyyy");
const toMomentObjectResult: moment.Moment | null = toMomentObject(moment(), "dd.mm.yyyy");
const isPast = date => !isInclusivelyAfterDay(date, TODAY_MOMENT);
const isAfterEndOfRange = date => !isInclusivelyBeforeDay(date, END_OF_RANGE_MOMENT);
isOutsideRange: day => {
const endOfRange = config.dayCountAvailableForBooking - 1;
return (
!isInclusivelyAfterDay(day, moment()) ||
!isInclusivelyBeforeDay(day, moment().add(endOfRange, 'days'))
);
},
isDayHighlighted: () => {},
return day => {
return (
!isInclusivelyAfterDay(day, moment()) ||
!isInclusivelyBeforeDay(day, moment().add(endOfRange, 'days'))
);
};
};
isOutsideRange: day => !isInclusivelyAfterDay(day, moment()),
isDayHighlighted: () => {},
isOutsideRange: day => !isInclusivelyAfterDay(day, moment()),
}
if (disableFutureDates && today.isBefore(day, 'day')) {
return true
}
if (maximumNights && startDate) {
const maxDate = startDate.clone().add(maximumNights, 'day')
if (focusedInput === 'endDate' && maxDate.isBefore(day)) {
return true
}
}
if (minimumDateRange > 0 || maximumDateRange > 0) {
return !isInclusivelyAfterDay(day, today.clone().add(minimumDateRange, 'days')) ||
maximumDateRange && isInclusivelyAfterDay(day, today.clone().add(maximumDateRange, 'days'))
}
if (isOutsideRange) {
return isOutsideRange(day)
}
return false
}
return day => {
const lastDayToEndBooking = apiEndDateToPickerDate(unitType, nextBookingStarts.toDate());
return (
!isInclusivelyAfterDay(day, startDate) || !isInclusivelyBeforeDay(day, lastDayToEndBooking)
);
};
}