Format Date on qtip full calender not match

56 Views Asked by At

I have problem on date format in full calendar. im using qtip on my full calendar and i try showing date but date showing format like this

Start Date : 1534291200000

This is My JS

   eventRender: function(event, element) {
      element.qtip({    
        content: {    
            text: '<span class="title">Start Date : ' + event.start +'</span>',
            style: { classes: 'qtip-dark' }
        },
        position: {
          my: 'bottom center', 
          at: 'top center'
        },
        style: {classes: 'qtip-tipsy'}
    });
    }
1

There are 1 best solutions below

0
CodeThing On BEST ANSWER

You can format date inside your function and then display it the way you want.

eventRender: function(event, element) {
      var getDt = new Date(event.start);
      var dateString = getDt.getFullYear() + '-' + (getDt.getMonth() + 1) + '-' + getDt.getDate();
      element.qtip({    
        content: {    
            text: '<span class="title">Start Date : ' + dateString +'</span>',
            style: { classes: 'qtip-dark' }
        },
        position: {
          my: 'bottom center', 
          at: 'top center'
        },
        style: {classes: 'qtip-tipsy'}
    });
    }