简体   繁体   中英

fullcalendar - disabling highlight on days during event dragging

I would like to drag & drop events into other dates.

  1. My events can be dropped only into days later then today.
  2. My events cannot be dropped into dates before today.

Currently when dragging an event, the calendar's cells below the drag are being highlighted. I would like to disable this highlight for days(cells) before today (per point #2)

Any idea how to disable this highlight?

Hi :) i needed to actually highlight the cell whenever mouse was over it and the way i did it was like this: ( KIND OF HACKY :P ) but it works:

Goto fullcalendar.js and go to this function buildTable(showNumbers) , on the line 2323 ( at least in my calendar, btw i´m using the latest version 1.6 ) edit this line:

"<div class='cellarea' >"; //This div doesnt have any class so i put that class there "cellarea"
            if (showNumbers) {

After this i went to my css and made this:

.cellarea:hover{
  border-color: #CCCCCC !important;
  cursor: pointer; 
  background-color: #CCCCCC;
 }

So the point is you can define the color you want on cell hover, if you define the color of your html body background color it will make it like invisible :). Hope that works for you let me know after you try.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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