CalendarPicker
CalendarPicker copied to clipboard
minRangeDuration is defaulting to use the disbaled
When using minRangeDuration with any value is passing the libraries disabled styles to the text.
Here is my Calendar
<CalendarPicker
allowBackwardRangeSelect={allowBackwardRangeSelect}
allowRangeSelection={isDateRange}
customDayHeaderStyles={customHeaderStyles}
dayLabelsWrapper={{
borderBottomWidth: 0,
borderTopWidth: 0,
}}
maxDate={maxDate}
minRangeDuration={1}
monthTitleStyle={{
fontFamily: FontName.CalibreSemibold,
fontSize: TITLE_FONT_SIZE,
fontWeight: TITLE_FONT_WEIGHT,
letterSpacing: 1,
}}
nextComponent={<ChevronRightSVG color={theme.colors.neutralStrong} />}
onDateChange={onDateChange}
previousComponent={
<ChevronLeftSVG color={theme.colors.neutralStrong} />
}
selectedDayColor={theme.colors.success}
selectedDayTextColor={
isDateRange ? theme.colors.basic : theme.colors.background
}
selectedEndDate={endDate}
selectedRangeEndStyle={{
backgroundColor: theme.colors.success,
}}
selectedRangeEndTextStyle={{
color: theme.colors.background,
}}
selectedRangeStartStyle={{
backgroundColor: theme.colors.success,
}}
selectedRangeStartTextStyle={{ color: theme.colors.background }}
selectedRangeStyle={{
backgroundColor: theme.colors.successSoft,
}}
selectedStartDate={startDate}
textStyle={{
textAlign: 'center',
color: theme.colors.basic,
fontFamily: FontName.Calibre,
fontSize: DAY_FONT_SIZE,
fontWeight: DAY_FONT_WEIGHT,
lineHeight: 16,
}}
todayBackgroundColor={theme.colors.accent}
todayTextStyle={{ color: theme.colors.basic }}
weekdays={WEEKDAYS}
yearTitleStyle={{
fontFamily: FontName.CalibreSemibold,
fontSize: TITLE_FONT_SIZE,
fontWeight: TITLE_FONT_WEIGHT,
letterSpacing: 1,
}}
/>
Here is a screenshot when allowBackwardRangeSelect
is false
Here is a screenshot when allowBackwardRangeSelect
is true
As you can see, the startDate is today's date and it is a range, the 19th is getting the disabled styles for some reason. I inspected the styles and it is getting #BBBBBB
as the color and I am not using that color value anyhwere in my code. Is it possible that some of my styles are making it default to use disabled?