jquery - disable bootstrap popover on a specific day click in fullcalendar js -


i using fullcalendar js. on dayclick function have binded bootstrap popover. working fine. want disable popover on specific dates on click.

$('#calendar').fullcalendar({ header: { left: 'prev', center: 'title', right: 'next' }, defaultdate: '2015-02-12', editable: true, eventlimit: true, // allow "more" link when many events businesshours: true, selectable: true, selecthelper: true,  dayclick: function(event,element,start, end, allday, jsevent, view) {      $(this).popover({ html: true, placement: 'right', title: function() { return $("#popover-head").html(); }, content: function() { return $("#popover-content").html(); }, html: true, container: '#calendar' }); $(this).popover('toggle');   var eventdata; eventdata = { title: title, start: start, end: end }; $('#calendar').fullcalendar('renderevent', eventdata, true); // stick? = true //$('#calendar').fullcalendar('unselect');  if(event.id='unavailable'){ $(this).popover('disable'); } },     events: [    { id: 150, title: 'conference', start: '2015-02-09', status : 'production', editurl :'http://yahoo.com', createurl : 'http://google.com', },  { id: 151, title: 'lunch', start: '2015-02-09',  status : 'approved', editurl :'http://yahoo.com', createurl : 'http://google.com', },  { id   : 152, title: 'dinner', start: '2015-02-11', status : 'exported', editurl :'http://yahoo.com', createurl : 'http://google.com', }, { id   : 153, title: 'birthday party', start: '2015-02-13', status : 'idea', editurl :'http://yahoo.com', createurl : 'http://google.com', }, { id: 154, title: 'new event', start: '2015-02-20', status : 'recurring', editurl :'http://yahoo.com', createurl : 'http://google.com', }, {  id: 155, title: 'repeating event', start: '2015-02-22', status : 'idea', editurl :'http://yahoo.com', createurl : 'http://google.com',   },                                 {  id: 156, title: 'new event', start: '2015-02-22', status : 'idea', editurl :'http://yahoo.com', createurl : 'http://google.com',   }, // areas "meeting" must dropped { id: 'availableformeeting', start: '2015-02-12', end: '2015-02-17', rendering: 'background', color:"#7ce51f",  },  // red areas no events can dropped { start: '2015-02-24', end: '2015-02-28',  rendering: 'background', color: '#ff9f89' }, { id: 'unavailable', start: '2015-02-06',  end: '2015-02-08', overlap: false, rendering: 'background', color: '#ff9f89' }   ] });    $("#calendar").find('.fc-prev-button').children('span').removeclass('fc-icon fc-icon-left-single-arrow').addclass('fa fa-arrow-left');  $("#calendar").find('.fc-next-button ').children('span').removeclass('fc-icon fc-icon-right-single-arrow').addclass('fa fa-arrow-right'); 

please help.

add in date call function , logic figure out if day day should or shouldnt pop popover.

 dayclick: function(date, event, view) {         var placementdate = $(this).data('date');          var yesno = "2015-05-13";            //can moment date logic here if want make nicer              if(yesno == placementdate){                  //do nothing             }             else{                 $(this).popover({                    html: true,                    placement: 'right',                    title: function() {                    return $("#popover-head").html();                    },                    content: function() {                    return $("#popover-content").html();                    },                    html: true,                    container: '#calendar'                    });                    $(this).popover('toggle');             }   } 

Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -