diff --git a/src/components/Calendar/CalendarComponents/components/DaysList.js b/src/components/Calendar/CalendarComponents/components/DaysList.js index fdf2f8e..7349c7f 100644 --- a/src/components/Calendar/CalendarComponents/components/DaysList.js +++ b/src/components/Calendar/CalendarComponents/components/DaysList.js @@ -255,28 +255,45 @@ const DaysList = ({ isOnActiveSlide, isStandard, }); + + const specialDate = (sDay, sMonth, sYear) => { for (var i = 0; i < events.length; i++) { if (sDay == events[i].day && sMonth == events[i].month && sYear == events[i].year) { - return (sDay, sMonth, sYear); } } }; + + const logEachDateDes = (sDay, sMonth, sYear) =>{ + return events.map((e) =>{ + + if (sDay == e.day && sMonth == e.month && sYear == e.year) { + + return

{e.description}

+ + } + + }) + + + } const showEventDescription = (sDay , sMonth, sYear) => { + for (var i = 0; i < events.length; i++) { if (sDay == events[i].day && sMonth == events[i].month && sYear == events[i].year) { - + return(events[i].description); } } + + } - return (
{ handleDayPress({ ...dayItem, isDisabled }); - console.log(specialDate(day)); - console.log(showEventDescription(day)) - showEvent(showEventDescription(day, month, year)) - console.log(month) + // console.log(specialDate(day)); + // console.log(showEventDescription(day)) + // showEvent(showEventDescription(day, month, year)) + showEvent(logEachDateDes(day, month, year)) }} onKeyDown={({ key }) => { /* istanbul ignore else */ diff --git a/src/components/Calendar/index.js b/src/components/Calendar/index.js index 9fa84dc..77343e7 100644 --- a/src/components/Calendar/index.js +++ b/src/components/Calendar/index.js @@ -53,7 +53,7 @@ const eventsList = [ date: "2022-01-12T00:00:00.000Z", categoryId: 1, year: 1400, - month: 11, + month: 10, day: 3 }, {