用于预订房间的可调整大小的 jQuery
我正在查看可调整大小的 jQuery UI 元素: http://jqueryui.com/demos /ressized/#snap-to-grid
我有一个预订时段网格 - 即。左边是一周中的几天,顶部是一天中的小时——所有这些都以单独的 DIV 形式排列在网格中。
我希望能够做的是,有人点击一个空档(或小时)来预订该时间 - 但是,如果在点击的时间之前或之后有可用时间,则允许该人调整其预订时间下一小时,但不允许它与当天已有的时段重叠。
有谁知道有什么例子可以说明如何做到这一点?
感谢您的指点
I'm looking at the resizable jQuery UI element: http://jqueryui.com/demos/resizable/#snap-to-grid
I have a grid of booking slots - ie. days of week down the left, and hours of the day across the top - all arranged as individual DIVs into a grid.
What I would like to be able to do is, someone click on an open slot (or hour) to book that time - however, if there is time available before or after the hour clicked on, allow the person to resize their hour booking to the next hour, but not to allow it to overlap an already existing slot on that day.
Does anyone know of any examples that show how to do this?
Thanks for any pointers
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
经过长时间的搜索,实际上有一些解决方案:
此页面是您在 Stack Overflow 中可以找到的关于该主题的最佳页面:向 jQuery Fullcalendar 添加资源视图/甘特图
有一些 fullCalendar 分支,其中包含一个资源视图,可以执行您的操作(和我)正在寻找:
https://github.com/benbruscella/fullcalendar
https://github.com/ikelin/fullcalendar
但是这个是最我相信,它是多功能的,因为它将提供日、周和月的资源视图,而其他两个仅提供当天的资源视图(至少根据我的快速评估):
http://tux.fi/~jarnok/fullcalendar-resourceviews/
事实上,这里列出了所有github fullCalendar 分支:
http://forked.yannick.io/arshaw/fullcalendar
After a long search there are actually a few solutions:
This page is the best you can get on the topic in Stack Overflow: Adding a Resource View/Gannt chart to jQuery Fullcalendar
There are a few fullCalendar forks that include a resource view that will do what you (and I) are looking for:
https://github.com/benbruscella/fullcalendar
https://github.com/ikelin/fullcalendar
But this one is the most versatile, I believe, because it will provide a resource view for day, week, and month whereas the other two only provide for the day (at least as per my quick evaluation):
http://tux.fi/~jarnok/fullcalendar-resourceviews/
In fact, here is a list of all the github fullCalendar forks:
http://forked.yannick.io/arshaw/fullcalendar