Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

Today button is disable by default make it first Active.(Fullcalendar, Make Today Button for current month active)

In following code i am showing how to open popover of current date when click on today button.

Write below code in your script file.

$(document).on('click', '.fc-today-button', function(){
                $('#fc-more-'+moment().format('YYYY-MM-DD')).click();
        });

Modify the Fullcaldar renderMoreLink() , add below line in renderMoreLink()

renderMoreLink: function(cell, hiddenSegs){
var custom = moment(cell.start).format('YYYY-MM-DD'); // custsom code
return $('<a class="fc-more" id="fc-more-'+custom+'"/>') added id in <a>
}
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
287 views
Welcome To Ask or Share your Answers For Others

1 Answer

Today button is disable by default make it first Active.Click here for making today button active

In following code i am showing how to open popover of current date when click on today button.

Write below code in your script file.

    $(document).on('click', '.fc-today-button', function(){
            $('#fc-more-'+moment().format('YYYY-MM-DD')).click();
    });

Modify the Fullcaldar renderMoreLink() , add below line in renderMoreLink()

 renderMoreLink: function(cell, hiddenSegs){
 var custom = moment(cell.start).format('YYYY-MM-DD'); // custsom code
   return $('<a class="fc-more" id="fc-more-'+custom+'"/>') //added custom id attribute
   }

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...