| Issue 2049: | Navigate to a day by double clicking it | |
| 1 person starred this issue and may be notified of changes. | Back to list |
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
Jun 7, 2014
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
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 |