Using custom CSS for custom buttons (FullCalendar)

偶尔善良 提交于 2020-12-15 05:13:08

问题


I have 2 custom buttons for my own fixed prev and next functions. I like all the buttons how they are but need to make the << and >> for those 2 buttons bigger, so I have to change the FontSize I guess. What is the best way to do this by preserving the other buttons (including their current FontSize) as they are? My code:

      customButtons: {
        prevMonth: {
          text: '<<',
          click: function() {
            calendar.changeView( 'resourceTimelineMonth');
            calendar.incrementDate( { days: -31 } );
          }
        },
        nextMonth: {
          text: '>>',
          click: function() {
            calendar.changeView( 'resourceTimelineMonth');
            calendar.incrementDate( { days: 31 } );
          }
        }
      },
      headerToolbar: {
        center: 'week,d14,month',
        right: 'today prevMonth,prev,next,nextMonth'
      },

回答1:


Add this to your CSS:

.fc .fc-prevMonth-button,
.fc .fc-nextMonth-button {
  font-size: 18px;
}


来源:https://stackoverflow.com/questions/65167079/using-custom-css-for-custom-buttons-fullcalendar

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!