How can I get Adam Shaw's FullCalendar to display responsive in a rails 4 app

后端 未结 1 1064
梦如初夏
梦如初夏 2020-12-18 05:21

I\'m using Ruby 2 Rails 4. I\'m using the twitter-bootstrap-rails gem to get my navbar to collapse on browser resize.

I want a similar effect with Adam Shaw\'s Full

相关标签:
1条回答
  • 2020-12-18 05:59

    It looks like you are trying to change the view based on resize. Take a look at the windowResize callback. http://arshaw.com/fullcalendar/docs/display/windowResize/.

    Make sure handleWindowResize is it's default value, true. Or the callback won't be invoked.

    windowResize: function(view) {
            if ($(window).width() < 514){
                $('#calendar').fullCalendar( 'changeView', 'basicDay' );
            } else {
                $('#calendar').fullCalendar( 'changeView', 'month' );
            }
    }
    
    0 讨论(0)
提交回复
热议问题