|
|
@ -255,10 +255,11 @@ const DaysList = ({ |
|
|
|
isOnActiveSlide, |
|
|
|
isOnActiveSlide, |
|
|
|
isStandard, |
|
|
|
isStandard, |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const specialDate = (sDay, sMonth, sYear) => { |
|
|
|
const specialDate = (sDay, sMonth, sYear) => { |
|
|
|
for (var i = 0; i < events.length; i++) { |
|
|
|
for (var i = 0; i < events.length; i++) { |
|
|
|
if (sDay == events[i].day && sMonth == events[i].month && sYear == events[i].year) { |
|
|
|
if (sDay == events[i].day && sMonth == events[i].month && sYear == events[i].year) { |
|
|
|
|
|
|
|
|
|
|
|
return (sDay, sMonth, sYear); |
|
|
|
return (sDay, sMonth, sYear); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
@ -266,8 +267,23 @@ const DaysList = ({ |
|
|
|
|
|
|
|
|
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const logEachDateDes = (sDay, sMonth, sYear) =>{ |
|
|
|
|
|
|
|
return events.map((e) =>{ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (sDay == e.day && sMonth == e.month && sYear == e.year) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return <p key={'description' + e.id}>{e.description}</p> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const showEventDescription = (sDay , sMonth, sYear) => { |
|
|
|
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 && sMonth == events[i].month && sYear == events[i].year) { |
|
|
|
if (sDay == events[i].day && sMonth == events[i].month && sYear == events[i].year) { |
|
|
|
|
|
|
|
|
|
|
@ -275,8 +291,9 @@ const DaysList = ({ |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
return ( |
|
|
|
return ( |
|
|
|
<div |
|
|
|
<div |
|
|
|
style={{ |
|
|
|
style={{ |
|
|
@ -289,10 +306,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(specialDate(day)); |
|
|
|
// console.log(specialDate(day));
|
|
|
|
console.log(showEventDescription(day)) |
|
|
|
// console.log(showEventDescription(day))
|
|
|
|
showEvent(showEventDescription(day, month, year)) |
|
|
|
// showEvent(showEventDescription(day, month, year))
|
|
|
|
console.log(month) |
|
|
|
showEvent(logEachDateDes(day, month, year)) |
|
|
|
}} |
|
|
|
}} |
|
|
|
onKeyDown={({ key }) => { |
|
|
|
onKeyDown={({ key }) => { |
|
|
|
/* istanbul ignore else */ |
|
|
|
/* istanbul ignore else */ |
|
|
|