Title: Mobile Default View
Last modified: August 31, 2016

---

# Mobile Default View

 *  [rbergeron81](https://wordpress.org/support/users/rbergeron81/)
 * (@rbergeron81)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/mobile-default-view/)
 * Since the calendar doesn’t scale very well for small mobile screens, I was wondering
   if there might be a hook or trigger to use with jQuery in order to set a default
   view.
 * So for screen sizes 768px to 1030px I wanted the calendar to display in “week”
   view and then for under 768px I wanted it to display in “day” view.
 * Anyway, I got this to work with some crude jQuery and thought I might leave this
   here for anyone to grab it if they need it:
 *     ```
       jQuery(document).ready(function($) {
   
       	var calWindowWidth = jQuery(window).width();
   
       	if (calWindowWidth <= 1030 && calWindowWidth >= 768) {
       		jQuery('.wpfc-calendar').fullCalendar( 'changeView', 'basicWeek' );
          } else if (calWindowWidth <= 767) {
           	jQuery('.wpfc-calendar').fullCalendar( 'changeView', 'basicDay' );
          } else {
          		jQuery('.wpfc-calendar').fullCalendar( 'changeView', 'month' );
          }
   
          jQuery(window).resize(function() {
   
          		var calResizeWidth = jQuery(window).width();
   
           	if (calResizeWidth <= 1030 && calResizeWidth >= 768) {
       			jQuery('.wpfc-calendar').fullCalendar( 'changeView', 'basicWeek' );
       	   	} else if (calResizeWidth <= 767 ) {
       			jQuery('.wpfc-calendar').fullCalendar( 'changeView', 'basicDay' );
       	   	} else {
       	   		jQuery('.wpfc-calendar').fullCalendar( 'changeView', 'month' );
       	   	}
       	});
       }); /* end of as page load scripts */
       ```
   
 * [https://wordpress.org/plugins/wp-fullcalendar/](https://wordpress.org/plugins/wp-fullcalendar/)

Viewing 1 replies (of 1 total)

 *  Plugin Support [angelo_nwl](https://wordpress.org/support/users/angelo_nwl/)
 * (@angelo_nwl)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/mobile-default-view/#post-7027088)
 * might be possible but you need to hack into the code under wp-fullcalendar/includes/
   js/inline.js

Viewing 1 replies (of 1 total)

The topic ‘Mobile Default View’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-fullcalendar.svg)
 * [WP FullCalendar](https://wordpress.org/plugins/wp-fullcalendar/)
 * [Support Threads](https://wordpress.org/support/plugin/wp-fullcalendar/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-fullcalendar/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-fullcalendar/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-fullcalendar/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [angelo_nwl](https://wordpress.org/support/users/angelo_nwl/)
 * Last activity: [10 years, 4 months ago](https://wordpress.org/support/topic/mobile-default-view/#post-7027088)
 * Status: not resolved