eventsmanager

Date Picker Year Range

Jul 30th, 2013
147
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. /*
  3. This snippet changes datepicker year range for all front-end date pickers.
  4.  
  5. For installation instructions, please visit http://wp-events-plugin.com/tutorials/how-to-safely-add-php-code-to-wordpress/
  6. */
  7. function my_em_datepicker_vals(){
  8.     ?>
  9.     <script type="text/javascript">
  10.         jQuery(document).bind('em_datepicker', function( e, em_datepicker ){
  11.             em_datepicker.yearRange = '-100:+10';
  12.         });
  13.     </script>  
  14.     <?php
  15. }
  16. add_action('wp_head','my_em_datepicker_vals',1000);
RAW Paste Data

Adblocker detected! Please consider disabling it...

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

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

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

×