My favorites | Sign in
Project Home Issues
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 2049: Navigate to a day by double clicking it
1 person starred this issue and may be notified of changes. Back to list
Status:  ExportedToGithub
Owner:  ----
Closed:  Aug 2015


Sign in to add a comment
 
Reported by stefan.k...@gmx.net, Dec 12, 2013
I found it convenient to navigate to a day by double clicking it, in a month and week view.
All you have to do is to add the "dayDblClick" event in addition to the existing "dayClick".

function dayBind(days) {
  days.click(dayClick)
    .mousedown(daySelectionMousedown);
  //Added by Stefan Kühn
  days.dblclick(dayDblClick)
      .mousedown(daySelectionMousedown);
}


function dayClick(ev) {
  if (!opt('selectable')) { // if selectable, SelectionManager will worry about dayClick
    var date = parseISO8601($(this).data('date'));
    trigger('dayClick', this, date, true, ev);
  }
}


//Added by Stefan Kühn
function dayDblClick(ev) {
  if (!opt('selectable')) { // if selectable, SelectionManager will worry about dayClick
    var date = parseISO8601($(this).data('date'));
    trigger('dayDblClick', this, date, true, ev);
  }
}


After adding the code at "//Added by Stefan Kühn" above you can use it in a call back as this:

$('#calendar').fullCalendar({
  dayDblClick: function(date, allDay, jsEvent, view) {
    $('#calendar').fullCalendar( 'gotoDate', date.getFullYear() , date.getMonth(), date.getDate() );
    $('#calendar').fullCalendar('changeView', 'basicDay');
  }
});



BTW
Thanky you very much for a wonderfull js lib!!!
I love it!
Dec 12, 2013
#1 stefan.k...@gmx.net
I forgot to mention: My sample code above only works in the month view!
Jun 7, 2014
Project Member #2 adamrs...@gmail.com
Cool. Might better be achieved in dayRender
http://arshaw.com/fullcalendar/docs/display/dayRender/

Might be a good built-in feature w/ an option.

 Issue 153  is sort of related
Summary: Navigate to a day by double clicking it (was: Navigate to a Day by double clicking it)
Status: Accepted
Labels: Type-Feature
Aug 21, 2015
Project Member #3 adamrs...@gmail.com
Discussion for this issue has moved to the following URL:
https://github.com/fullcalendar/fullcalendar/issues/2314

This is because Google Code is shutting down. Apologies if you are being pestered with these notifications. This is a one-time event.

Happy coding,
Adam
Status: ExportedToGithub
Sign in to add a comment

Powered by Google Project Hosting