Modify WP FullCalendar JS options

Jul 27th, 2015
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. /*
  3. This snippet will limit the displayed hours for day/week views. You can use this snippet to modify any value in the fullcalendar options as per the documentation - (this is for WP FullCalendar below v1.0)
  5. For information on where to paste this, see here -
  6. */
  7. function my_wp_fullcalendar_args(){
  8.     ?>
  9.     <script type="text/javascript">
  10.     jQuery(document).bind('wpfc_fullcalendar_args', function( e, options ){
  11.         options.minTime = "9:00am";
  12.         options.maxTime = "5:00pm";
  13.     });
  14.     </script>
  15.     <?php
  16. }
  17. add_action('wp_head','my_wp_fullcalendar_args');
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add to your ad blocker whitelist or disable your adblocking software.