title: fullcalendar previous and next year buttons in text
body: <p>Over two years ago, this question was asked here but being a noob, I don't know how to use the method posted by Joel Potter as an answer to the question in this URL:</p>
  
  <p><a href="https://stackoverflow.com/questions/2835953/fullcalendar-jquery-plugin-show-years-on-nextyear-buttons">Fullcalendar jquery plugin Show years on nextYear buttons</a></p>
  
  <p>Here is what I have so far in my code:</p>
  
  <pre><code>$('.fc-button-prevYear span').click(function(){
             setYearButtons();
          });
  
          $('.fc-button-nextYear span').click(function(){
             setYearButtons();
          });
  
          function setYearButtons(){
              var currentDate = $("#calendar").fullCalendar( 'getDate' );
  
              // I'm not 100% sure on these class names, but you can inspect the dom and figure those out
              $(".fc-button-prevYear span").text(currentDate.getYear()); 
              $(".fc-button-nextYear span").text(currentDate.getYear() + 2);
          }
  </code></pre>
  
  <p>How do I initialize the code so that at the beginning of the calendar, I will not see the next and previous year arrows anymore but the next and previous year in text?</p>
  
  <p>Also, the logic for calculating the year seems to be working but the text I am seeing is wrong. For example, if the current year is 2012 (initially I see arrow buttons and I need to click on previous or next year button before they change to text), when I click on either next or previous year to go to 2013, my text buttons show 112 for the previous year and 114 for the next year instead of showing 2012 for previous and 2014 for next.</p>