My event date picker pick dates for every month Javascript calendar
if I want to highlight the 15 august it still highlight 15 of everymonth I tried to remove it by using .remove but it doesn't work
here's my code :
https://codepen.io/Dennyyan/pen/mdQZYga
4 Replies
Cause that's what you're telling it to do. Here you add just the day of the month to the eventDates array:
then here, you're checking if the eventDates array contains an entry that has the same value as the day of the month in the block:
there's no information in the eventDates array about the month or the year for the events, it's just going to be a list of numbers between 1 and 31, and whenever the renderCalendar function runs into a day like that in the current month, it adds the event-day class
I see so my logic is entirely wrong how to fix this sir
you'll have to store the entire date and then check against the date instead of just the day like you're doing now
Ahhhh i seee thank you very much bro