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

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

问题描述

假设正在从数据库获取事件的日期,而我的事件日期应该是哪种格式.

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

开始:2012-03-29,08:00am, 结束于:2012-03-30,08:00am, 整天:假,

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

我做错了吗?

推荐答案

我使用以下格式,并且对我有用:

I use the following format and it works for me:

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

还请确保在您的JSon中,您将allDay作为布尔值而不是字符串

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

希望这会有所帮助

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

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