Advertisement
chrishajer

Initialize a datepicker on a text field

Apr 10th, 2013
292
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //  http://www.gravityhelp.com/forums/topic/date-picker-validation-in-datefield#post-149929
  2. jQuery(document).bind('gform_post_render', function(){
  3.         // create new custom datepicker
  4.         // change input_3_4 to your text field where you want a custom formatted datepicker
  5.         jQuery("#input_3_4").datepicker({
  6.                 defaultDate: '+7d',
  7.                 autoSize: true,
  8.                 minDate: '+7d',
  9.                 dateFormat: 'DD, d MM, yy',
  10.                 gotoCurrent: true,
  11.                 prevText: '',
  12.                 showOn: 'both',
  13.                 buttonImage: '',
  14.                 buttonText: '',
  15.                 buttonImageOnly: true
  16.         });
  17. });
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement