完整日历内部事件下降到下一个日期条件 [英] Full calendar internal event drop to next date condition

查看:62
本文介绍了完整日历内部事件下降到下一个日期条件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将事件从本月的1日(或当前日期之前的任何日期)拖到当前日期(24 / Jun)以及以后的几天。我们如何将条件(如事件)仅可放置到当前日期和下一个未来日期。
在用鼠标指针拖动事件的同时,该事件也被拖动,这里的要求是我们可以用鼠标指针添加任何图标而不是移动事件。

I am dragging an event from 1st(or any date before the current date) of this month to current date(24/Jun) and to the next future days. How can we put the condition like events only drop-able on to current date and next future dates. And while dragging an event with mouse pointer, the event is also dragged, here the requirement is can we add any icon with mouse pointer instead of event moving.

场景是:我们有一个图标,当我们将事件从2020年6月10日拖到2020年6月25日,从2020年6月10日拖到2020年6月22日时,用鼠标指针拖动事件时,它应该显示带有红叉标记(因为它是无效的),一旦拖动进入23 / Jun / 20220,则应该出现没有叉标记的ICON图像(这是有效日期)。请找到图片。

Scenario is: We have an icon, and when we drag an event from 10/Jun/2020 to 25/Jun/2020, from 10/Jun/2020 to 22/Jun/2020, while dragging the event with mouse pointer it should show ICON image with red cross mark(as it is invalid), once the dragging enters 23/Jun/20220, ICON image with out cross mark should come (as is is valid date). Please find the image.

推荐答案

通过添加以下代码满足要求,它只是在我们拖动事件时将红叉圆圈图标附加到事件上,仍然不知道原始事件如何,而out事件仅移动了图标(不知道如何添加外部图标,而不是预先存在的红叉圆圈)

Met the requirement by adding the below code, It just appends red cross circle icon to the event when we drag, still don't know how the original thing like with out event moving just icon(don't know how to add external icon rather than pre-existed red cross circle) should move.

 eventConstraint:{
       start: new Date(Date.now() + (20 * 60 * 1000)),
       end: 'current month end' 
       }

这篇关于完整日历内部事件下降到下一个日期条件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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