Wednesday, August 10, 2022

Fullcalendar add Custom Text to Date if there is not Event

Fullcalendar add Custom Text to Date if there is not Event- The Rich Post

Hello to all, welcome to In this post, I will tell you, How Fullcalendar add Custom Text to Date if there is not Event?

fullcalendar is the best A JavaScript event calendar.

Here is the working Image:



Here is the complete working and tested code and you need to add this into you html file:

<!DOCTYPE html>
<meta charset='utf-8' />
<link href='' rel='stylesheet' />
<link href='' rel='stylesheet' media='print' />
<script src=''></script>
<script src=''></script>
<script src=''></script>

  $(document).ready(function() {

      header: {
        left: 'prev,next today',
        center: 'title',
        right: 'month,basicWeek,basicDay'
      defaultDate: new Date(),
      navLinks: true, // can click day/week names to navigate views
      editable: true,
      eventLimit: true, // allow "more" link when too many events
      events: [{
          title: 'All Day Event',
          start: '2018-09-12'
     dayRender: function(date, cell) {
        cell.append('<div style="text-align:center; background-color:blue; color:#fff;padding:2px 0;margin-top:20px;">Add Your Text!</div>');
     eventAfterAllRender: function(view) {
    var dayEvents = $('#calendar').fullCalendar('clientEvents', function(event) {
      if (event.end) {
      var dates = getDates(event.start, event.end);
      $.each(dates, function(index, value) {
        var td = $('td.fc-day[data-date="' + value + '"]');
      } else {
      var td = $('td.fc-day[data-date="' + event.start.format('YYYY-MM-DD') + '"]');



  body {
    margin: 40px 10px;
    padding: 0;
    font-family: "Lucida Grande",Helvetica,Arial,Verdana,sans-serif;
    font-size: 14px;

  #calendar {
    max-width: 900px;
    margin: 0 auto;


  <div id='calendar'></div>


 If you have any query related to this post, then please do comment below or  ask question.

the authortherichpost
Hello to all. Welcome to Myself Ajay Malhotra and I am freelance full stack developer. I love coding. I know WordPress, Core php, Angularjs, Angular 7, Angular 8, Angular 9, Angular 10, Angular 11, Angular12, Angular 13, Angular 14, Bootstrap 5, Nodejs, Laravel, Codeigniter, Shopify, Squarespace, jQuery, Google Map Api, Vuejs, Reactjs, Big commerce etc.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.