Fullcalendar jQuery - 可以从谷歌日历检索颜色吗?
我知道可以根据谷歌日历等来源设置事件的颜色,但我想知道是否有任何方法可以自动检索在谷歌日历本身上设置的颜色?
浏览 gcal.js,似乎没有任何关于颜色的推送,但在 google 的 json api(然而 json-c)中,有对颜色的引用。
http://code.google.com/apis/calendar/data /2.0/developers_guide_protocol.html#RetrivingAllCalendars
我想这是对 Fullcalendar 的功能请求的问题,但我想知道我是否遗漏了其中已有的内容?
谢谢你!
I know it is possible to set the colour for events based on a source such as a google calendar, but I was wondering if there is any way to retrieve the colour automatically as it is set on the google calendar itself?
Looking through the gcal.js, there doesn't seem to be anything pushed regarding the colour, but in google's json api (json-c however), there is a reference to the colour.
http://code.google.com/apis/calendar/data/2.0/developers_guide_protocol.html#RetrievingAllCalendars
I suppose it is a matter of a feature request to Fullcalendar but I'm wondering if I am missing something already in there?
Thank you!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
日历的颜色不在 XML,ICAL Feed 中。它仅显示在用户可用的日历列表中。它列出了日历并使用:
GCal 命名空间元素参考
因此不幸的是,gcal.js 不支持获取列表,除非您使用其他插件来获取颜色,否则您将无法获取颜色。
那样的话事情就这么简单了。
在 gcal.js 中推送它 - 我认为您可以在
Google Source feed 行中添加包含此值的内容:(日历列表 - 不是日历)
The color of the calendar is not in the XML,ICAL Feed. It is only shown in the list of calendars available from a user. It lists the calendars and uses the:
GCal namespace element reference
So unfortunately, gcal.js does not support getting the list and you will not get the color unless you use another plugin to do so.
In that case it would have been as easy as this.
In the gcal.js where the push it - I think you can add something in the line of
Google Source feed contains this value: (Calendar list - not calendar)
之前在 回答过 gcal/fullcalendar 问题fullcalendar jQuery - 可以从 Google 日历事件中检索描述吗?。您需要修改
gcal.js
的源代码。您可能只想将 Google 日历对象挂在事件之外(这样您就可以访问颜色和其他所有内容):Previously answered a gcal/fullcalendar question at fullcalendar jQuery - Possible to retrieve description from Google Calendar events?. You will need to modify the source of
gcal.js
. You might want to just hang the Google Calendar object off the event (so you can access the color and everything else):我这样做了 https://developers.google.com/ google-apps/calendar/v3/reference/colors/get#examples 但是在 JavaScipt 中。这对我有用。
I did that https://developers.google.com/google-apps/calendar/v3/reference/colors/get#examples But in JavaScipt. It's works for me.