|
|
@ -159,6 +159,7 @@ const DaysList = ({ |
|
|
|
const customDayItemClassName = customDaysClassName.find((day) => |
|
|
|
const customDayItemClassName = customDaysClassName.find((day) => |
|
|
|
isSameDay(dayItem, day) |
|
|
|
isSameDay(dayItem, day) |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
const classNames = '' |
|
|
|
const classNames = '' |
|
|
|
.concat(isToday && !isSelected ? ` -today ${calendarTodayClassName}` : '') |
|
|
|
.concat(isToday && !isSelected ? ` -today ${calendarTodayClassName}` : '') |
|
|
|
.concat(!dayItem.isStandard ? ' -blank' : '') |
|
|
|
.concat(!dayItem.isStandard ? ' -blank' : '') |
|
|
@ -254,23 +255,23 @@ const DaysList = ({ |
|
|
|
isOnActiveSlide, |
|
|
|
isOnActiveSlide, |
|
|
|
isStandard, |
|
|
|
isStandard, |
|
|
|
}); |
|
|
|
}); |
|
|
|
const specialDay = (sDay) => { |
|
|
|
const specialDate = (sDay, sMonth, sYear) => { |
|
|
|
var eventDate; |
|
|
|
|
|
|
|
for (var i = 0; i < events.length; i++) { |
|
|
|
for (var i = 0; i < events.length; i++) { |
|
|
|
if (sDay == events[i].day) { |
|
|
|
if (sDay == events[i].day && sMonth == events[i].month && sYear == events[i].year) { |
|
|
|
|
|
|
|
|
|
|
|
return sDay; |
|
|
|
return (sDay, sMonth, sYear); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}; |
|
|
|
}; |
|
|
|
const showEventDescription = (sDay) => { |
|
|
|
|
|
|
|
var eventDate; |
|
|
|
|
|
|
|
|
|
|
|
const showEventDescription = (sDay , sMonth, sYear) => { |
|
|
|
for (var i = 0; i < events.length; i++) { |
|
|
|
for (var i = 0; i < events.length; i++) { |
|
|
|
if (sDay == events[i].day) { |
|
|
|
if (sDay == events[i].day && sMonth == events[i].month && sYear == events[i].year) { |
|
|
|
|
|
|
|
|
|
|
|
return (events[i].description); |
|
|
|
return(events[i].description); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -288,8 +289,10 @@ const DaysList = ({ |
|
|
|
className={`Calendar__day -${isRtl ? 'rtl' : 'ltr'} ${additionalClass}`} |
|
|
|
className={`Calendar__day -${isRtl ? 'rtl' : 'ltr'} ${additionalClass}`} |
|
|
|
onClick={() => { |
|
|
|
onClick={() => { |
|
|
|
handleDayPress({ ...dayItem, isDisabled }); |
|
|
|
handleDayPress({ ...dayItem, isDisabled }); |
|
|
|
console.log(specialDay(day)); |
|
|
|
console.log(specialDate(day)); |
|
|
|
showEvent(showEventDescription(day)) |
|
|
|
console.log(showEventDescription(day)) |
|
|
|
|
|
|
|
showEvent(showEventDescription(day, month, year)) |
|
|
|
|
|
|
|
console.log(month) |
|
|
|
}} |
|
|
|
}} |
|
|
|
onKeyDown={({ key }) => { |
|
|
|
onKeyDown={({ key }) => { |
|
|
|
/* istanbul ignore else */ |
|
|
|
/* istanbul ignore else */ |
|
|
@ -307,7 +310,7 @@ const DaysList = ({ |
|
|
|
data-is-default-selectable={shouldEnableKeyboardNavigation} |
|
|
|
data-is-default-selectable={shouldEnableKeyboardNavigation} |
|
|
|
> |
|
|
|
> |
|
|
|
{!isStandard ? '' : getLanguageDigits(day)} |
|
|
|
{!isStandard ? '' : getLanguageDigits(day)} |
|
|
|
{specialDay(day) == day ? <span>.</span> : ' '} |
|
|
|
{specialDate(day, month, year) == (day, month, year) ? <span>.</span> : ' '} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
); |
|
|
|
); |
|
|
|
}; |
|
|
|
}; |
|
|
|