Advertisement
chrishajer

Initialize a datepicker on a text field

Apr 10th, 2013
370
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
jQuery 0.68 KB | None | 0 0
  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
Add Comment
Please, Sign In to add comment
Advertisement