added prevYear,nextYear methods/buttons

This commit is contained in:
Adam Shaw 2009-10-12 07:01:26 +00:00
parent 13f7d167b3
commit 9db94207cb
3 changed files with 18 additions and 0 deletions

View file

@ -117,6 +117,11 @@ table.fc-header {
padding: 4px 6px;
}
.fc-header .fc-state-default span,
.fc-header .ui-state-default span {
white-space: nowrap;
}
/* for adjacent buttons */
.fc-header .fc-no-right {

View file

@ -54,6 +54,8 @@ var defaults = {
buttonText: {
prev: ' ◄ ',
next: ' ► ',
prevYear: 'prev year',
nextYear: 'next year',
today: 'today',
month: 'month',
week: 'week',
@ -367,6 +369,16 @@ $.fn.fullCalendar = function(options) {
render(1);
},
prevYear: function() {
addYears(date, -1);
render();
},
nextYear: function() {
addYears(date, 1);
render();
},
today: function() {
date = new Date();
render();

View file

@ -13,6 +13,7 @@
$('#calendar').fullCalendar({
header: {
left: 'prevYear,prev,next,nextYear today',
right: 'month,agendaWeek,basicWeek,agendaDay,basicDay'
},
editable: true,