added prevYear,nextYear methods/buttons
This commit is contained in:
parent
13f7d167b3
commit
9db94207cb
3 changed files with 18 additions and 0 deletions
|
@ -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 {
|
||||
|
|
12
src/main.js
12
src/main.js
|
@ -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();
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
|
||||
$('#calendar').fullCalendar({
|
||||
header: {
|
||||
left: 'prevYear,prev,next,nextYear today',
|
||||
right: 'month,agendaWeek,basicWeek,agendaDay,basicDay'
|
||||
},
|
||||
editable: true,
|
||||
|
|
Loading…
Reference in a new issue