简体   繁体   English

将全天活动添加到 Google 日历的链接

[英]Link to add all day event to Google Calendar

So I looked at Link to add to google calendar , but I want to do the same with an all day event.所以我查看了链接以添加到谷歌日历,但我想对全天活动做同样的事情。

I've tried doing dates={date.getUTCDate()} , but the link doesn't take me to a google cal add event page (it just takes me to my calendar), I suspect because the date is wrong.我试过做dates={date.getUTCDate()} ,但链接没有把我带到谷歌 cal add 事件页面(它只是把我带到我的日历),我怀疑是因为日期错误。

Thanks谢谢

If you don't put a time in the link it seems to mark the event as all day, for example: 20160627/20160627如果您没有在链接中输入时间,它似乎会将事件标记为全天,例如:20160627/20160627

So if you want a one day all day event for June 27 it would look like (using the example from " Link to add to google calendar "):因此,如果您想要 6 月 27 日的全天活动,则它看起来像(使用“ 添加到谷歌日历的链接”中的示例):

<a href="http://www.google.com/calendar/event?
action=TEMPLATE
&text=[event-title]
&dates=20160627/20160627
&details=[description]
&location=[location]
&trp=false
&sprop=
&sprop=name:"
target="_blank" rel="nofollow">Add to my calendar</a>

For a 2 day event it would look like (notice you have to add one extra day) :对于为期 2 天的活动,它看起来像(请注意,您必须多添加一天)

<a href="http://www.google.com/calendar/event?
action=TEMPLATE
&text=[event-title]
&dates=20160627/20160629
&details=[description]
&location=[location]
&trp=false
&sprop=
&sprop=name:"
target="_blank" rel="nofollow">Add to my calendar</a>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM