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