Full calendar internal event drop to next date condition

我怕爱的太早我们不能终老 提交于 2020-06-29 03:39:15

问题


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.

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.


回答1:


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' 
       }


来源:https://stackoverflow.com/questions/62541789/full-calendar-internal-event-drop-to-next-date-condition

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!