0

Here I am adding an image to day cell using css:

.fc-widget-content::after {
     margin-top: 1 px;
    margin-left: 70 px;
    font-family: 'FontAwesome';content:"\f00d";
    position: absolute;
    white-space: pre;
    color:#F00;
}

When you click on this icon I want to delete all events on that particular day. I am using jquery, fullcalendar.js and I am using day click function as well.

dayClick: function(date, jsEvent, view) { 
            alert('Clicked on: ' + date.getDate()+"/"+date.getMonth()+"/"+date.getFullYear());  
        },

When I click on day it shows the date, but what I want to achieve is that when you click on that icon I can delete total events on that day. Please help. Thanks.

Kevin
  • 874
  • 3
  • 16
  • 34
Anuradha
  • 21
  • 1
  • 7

1 Answers1

0

Yo can't do it that way. ::after is not part of the DOM so it's not accesible using Javascript.

In this answer you could find some methods to fix your problem.

Community
  • 1
  • 1
Sergiodiaz53
  • 1,268
  • 2
  • 14
  • 23