0

i would like to understand why "+x more" link in the bottom of day cell doesn't work when i add info.event.setProp('display','block'); in eventDidMount ?

Codepen.io example

Many thanks in advance !

    eventDidMount: function(info) {
      var tooltip = new Tooltip(info.el, {
        title: info.event.extendedProps.description,
        placement: 'top',
        trigger: 'hover',
        container: 'body'
      });
      info.event.setProp('display','block');
    },
ADyson
  • 57,178
  • 14
  • 51
  • 63
Flucktuken
  • 29
  • 5
  • Not sure...but why do you need that line? It doesn't appear to be necessary in order for the tooltips to work... https://codepen.io/ADyson82/pen/wvzBVBz – ADyson Nov 30 '20 at 09:01
  • Thank you for your answer. Because i want to change display of the event according to a criteria in my database – Flucktuken Dec 01 '20 at 10:11
  • But if you want to set that based on database criteria, then surely you should set it as part of the initial event data before the event is rendered. eventDidMount happens after the event is rendered. If you make it part of the event data (something which, I assume, you can do server-side when generating the events from your database), then there seems to be no problem - demo: https://codepen.io/ADyson82/pen/GRjJBQe – ADyson Dec 01 '20 at 11:48
  • Great ! i didn't know it was possible to set display in events :...Thank you very much ! – Flucktuken Dec 02 '20 at 19:23
  • Any property of an event that can be set via .setProp can also be set up-front in the initial setup. – ADyson Dec 02 '20 at 21:00

0 Answers0