fullCalendar获取某一天的日程(event)
来源:互联网 发布:歌华机顶盒网络未连接 编辑:程序博客网 时间:2024/05/20 11:37
最近又是忙死的节奏。。。好久不做笔记,哎。最近的项目用到了fullCalendar这个插件,看了官方文档,确实是个很棒的插件,可以做到很多日历的事情。
官方API:
clientEvents
Retrieves events that FullCalendar has in memory.
.fullCalendar( ‘clientEvents’ [, idOrFilter ] ) -> Array
This method will return an array of Event Objects that FullCalendar has stored in client-side memory.
If idOrFilter is omitted, all events will be returned.
If idOrFilter is an ID, all events with the same ID will be returned.
idOrFilter may also be a filter function that accepts one Event Object argument and returns true if it should be included in the result set.
获取某天的event:
dayClick: function(date, jsEvent, view) { var events = $('#calendar').fullCalendar('clientEvents', function(event) { var eventStart = event.start; var eventEnd = event.end ? event.end : null; var theDate = date; // Make sure the event starts on or before date and ends afterward // Events that have no end date specified (null) end that day, so check if start = date return (eventStart <= theDate && (eventEnd >= theDate) && !(eventStart < theDate && (eventEnd == theDate))) || (eventStart == theDate && (eventEnd === null)); }); console.log(events); // do whatever with the console.log(events[0]._allDay); }
这里只是dayclick的一个例子,可以在任何接口里使用,只要有date参数!
阅读全文
0 0
- fullCalendar获取某一天的日程(event)
- FullCalendar(日程管理控件)
- FullCalendar(日程管理控件)
- FullCalendar(日程管理控件)
- 使用FullCalendar做一个自己的日程管理(一)- 基础篇
- 使用FullCalendar做一个自己的日程管理(二)- 事件篇
- 使用FullCalendar做一个自己的日程管理(三)- 持久化篇
- Web日程管理FullCalendar
- fullcalendar,轻松管理日程
- Web日程管理FullCalendar
- 日程管理 FullCalendar
- 最流行的日程编辑控件FullCalendar精华摘要
- jquery-ui fullCalendar 可用于设计日程管理的控件
- jquery-ui fullCalendar可用于设计日程管理的控件
- 【FullCalendar】应用——新建日程事件(四)
- fullcalendar 日程插件demo使用
- 使用FullCalendar做日程管理
- ASP.NET MVC5+EF6+EasyUI 后台管理系统(86)-日程管理-fullcalendar插件用法
- powerpoint无法加载宏mathtype
- docker在实际发布tomcat + mysql项目中的应用
- C语言之指针
- linux系统产品使用教程
- 上机练习题2——接口 表达教师与研究生的薪水
- fullCalendar获取某一天的日程(event)
- 将日志文件从EC2实例自动备份到S3
- centos6.5 ping: unknown host www.baidu.com
- opencv小记:IplImage与Mat之间的转换
- cmake 入门编程之打印信息或者变量
- JavaScript数组方法总结
- MySQL上篇
- 厚积薄发---从此再也不用担心闭包问题
- 23种设计模式