javascript - Using custom CSS for custom buttons (FullCalendar) - Stack Overflow

I have 2 custom buttons for my own fixed prev and next functions. I like all the buttons how they are b

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'
      },

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'
      },
Share Improve this question asked Dec 6, 2020 at 10:41 RomeRome 44211 silver badges28 bronze badges 2
  • Probably with the class for those two buttons – Aleksandar Commented Dec 6, 2020 at 11:01
  • Sure but the issue is that custom buttons share their classes with the other buttons which are not supposed to change. – Rome Commented Dec 6, 2020 at 11:49
Add a ment  | 

1 Answer 1

Reset to default 5

Add this to your CSS:

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

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744854693a4597336.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信