0

I am trying to display a div instead of element in fullcalendar using html and css via jquery as follows:

$(element).css("display", "none");
                        $('.fc-day[data-date="' + event.start.format("YYYY-MM-DD") + '"]').append("<div class='booked'><span>Booked <br><small>for date</small></span></div>");

And css

.booked{
  display: -webkit-box;      
  display: -moz-box;       
  display: -ms-flexbox;   
  display: -webkit-flex;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  background-color: #CD5C5C;
  cursor: not-allowed;
  pointer-events: none;
  color: #fff;
}

Although, its working fine as intended on chrome but not on other browsers such as firefox.

Chrome:

Chrome Screenshot

Firefox

Firefox Screenshot

Update:

If I inspect each container:

In chrome

<td class="fc-day fc-widget-content fc-sun fc-future" data-date="2019-06-23">
    <div class="booked"><span>Booked <br><small>for date</small></span></div>
</td>

But in case of firefox, its not showing inner element i.e div .booked Firfox inspect

CODEPEN LINK

You can check this link its showing my problem, you can check in chrome and firefox.

CODEPEN LINK

Aayush Dahal
  • 856
  • 1
  • 17
  • 51

1 Answers1

1

What you mising is, you forget making the td height 100% too. So you need add css for the td. In my opinion, try to add this css

.fc-bg td {
height: 100%;
 }

and it will work.

Already trying on the pen, and it's working. CodePen

dooooooofai
  • 88
  • 1
  • 15