kthornbloom / Monthly

A jQuery based responsive calendar
http://kthornbloom.com/monthly/
Other
316 stars 108 forks source link

Only clicking on an event and not on blank day #85

Open famous76 opened 6 years ago

famous76 commented 6 years ago

Hi ! This calendar is very nice.

I'm searching for only clicking on an event (.monthly-day .monthly-event-indicator) and not on a blank day. It seems to me useless to click on a blank day and seeing : No Events.

I'm pretty sure I have to change something here

// Click A Day
    $(document.body).on("click touchstart", parent + " .monthly-day", function (event) {
// If events, show events list

But i tried everything, nothing is working. Could you help me please ?

Thank you very much !

jay00472 commented 5 years ago

add below code on your click event method. var eventExist = $(this).find('.monthly-indicator-wrap').html(); if(eventExist==''){ return false; }