My favorites | Sign in
Project Home Issues
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 328: Handling a double click event
1 person starred this issue and may be notified of changes. Back to list
Status:  Done
Owner:  ----
Closed:  Feb 2010


Sign in to add a comment
 
Reported by kaneuniv...@gmail.com, Feb 6, 2010
In case it helps anyone, this is how I'm doing it:

I have a global variable called "_cal.clicked", which is set to "", "event", or "day."

The first time something is clicked, I set a timeout of 300ms to wait for a second click. If the 
timeout expires before the second click, I don't do anything. Otherwise, I run the code as if it 
were a dblclick event.

function eventClick(event, jsEvent, view) {

    if(_cal.clicked != "event"){

    	//WAIT FOR ANOTHER "event" CLICK
    	_cal.clicked = "event";
    	setTimeout(function(){_cal.clicked = "";}, 300);

    }
    else{

    	//RESET THE FLAG
    	_cal.clicked = "";
    	
    	//PRETEND IT'S A DOUBLE-CLICK
    	log("Faux event dblclick (8073311)");

    }
}
Feb 6, 2010
Project Member #1 adamrs...@gmail.com
it will be easier another way.. look at my comment in this thread: 
https://code.google.com/p/fullcalendar/issues/detail?id=231
Status: Done
Feb 6, 2010
#2 kaneuniv...@gmail.com
Excellent -- thanks, Adam. I think I even saw that thread before but couldn't find it 
again when searching for "dblclick". (The problem was that the search was set to "open 
issues" instead of "all issues").

Do you have a similar approach for handling a double click on an empty day?

Michael
May 6, 2010
#3 sunniyeow
Michael, to answer your question (on behalf of the esteemed Mr. Shaw), Adam is
working on a "dayRender" method - in case you didn't know about this fact yet.

His "eventRender" code for the "dblclick" works great.
Sign in to add a comment

Powered by Google Project Hosting