| Issue 403: | Click on Day Number opens agenda view for that day | |
| 2 people starred this issue and may be notified of changes. | Back to list |
Would love to have a setting that makes the day number in month view clickable, which in turn opens up the agenda view for that day.
Mar 15, 2010
On my calendar page, I used the following:
function moveToDay(date){
var toDate = new Date(date);
//alert(toDate);
$('#calendar').fullCalendar( 'changeView', 'agendaDay' );
$('#calendar').fullCalendar( 'gotoDate', toDate );
}
In fullcalendar.js, I modified the following:
<div class='fc-day-number'>"+aO.getDate()+"</div>
with:
<div class='fc-day-number'><a href='#' onClick='moveToDay(\""+aO+"\");return
false'>"+aO.getDate()+"</a></div>
And the added these new css entries for link color:
.fc-grid .fc-day-number a{
color:#000;
}
.fc-grid .fc-day-number a:hover{
color:#F60;
}
This seems to work really well in this format. As I figured, pretty simple code
changes, but really helpful for usable navigation.
Oct 14, 2010
The above only adds links to the first month. If you go to the next month, the links are gone. You also need to update another section, about line 1200 in fullcalendar.js:
replace:
td.find('div.fc-day-number').text(d.getDate());
with
td.find('div.fc-day-number').html("<a href='#'onClick='moveToDay(\""+d+"\");'>"+d.getDate()+"</a>");
|
|
| ► Sign in to add a comment |
Mergedinto: 153