在fullcalender上格式化事件日期和时间 [英] formatting events date and time on fullcalender

查看:133
本文介绍了在fullcalender上格式化事件日期和时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设我从事数据库中获取事件的日期,我的事件日期应该采用什么格式。

开始日期:2012-03-29,08:00 am,
结束日期:2012-03-30,08:00 am,
allday:false ,

无法识别事件的结束日期和时间



我做错了什么?



请尽快帮助!

解决方案

我使用以下格式,它适用于我:

  mm / dd / yyyy hh:mm tt 
eg
03/15/2012 05:10

还要确保在你的JS中你allDay作为布尔值而不是字符串

 allDay=false,//这是错误的。在这种情况下,您不会在日历中看到任何事件

allDay= false,//这是正确的

希望这有助于

Supposing am getting the dates for an event from a database in what format should my event date be am thinking.

start: 2012-03-29, 08:00am, end: 2012-03-30, 08:00am, allday: false,

it does not recognize the end date and the time for the event

Am i doing the wrong thing?

please help out asap!

解决方案

I use the following format and it works for me:

mm/dd/yyyy hh:mm tt
e.g.
03/15/2012 05:10 AM

Also make sure that in your JSon you have allDay as a boolean and not as a string

"allDay"= "false", // this is wrong. In this case you won't see any events on your calendar

"allDay"= false,   // This is correct

Hope this helps

这篇关于在fullcalender上格式化事件日期和时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆