[英]Format Date on qtip full calender not match
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
我在整个日历上使用qtip,我尝试显示日期,但日期显示格式如下
Start Date : 1534291200000
开始日期:1534291200000
This is My JS 这是我的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'}
});
}
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'}
});
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.