Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // http://www.gravityhelp.com/forums/topic/date-picker-validation-in-datefield#post-149929
- // add a second datepicker with a custom format which will pass validation
- // only enqueue the script when form 3 is being embedded
- // change the 3 here to your form ID
- add_action('gform_enqueue_scripts_3', 'enqueue_custom_datepicker', 10, 2);
- function enqueue_custom_datepicker($form, $is_ajax) {
- // enqueue the script to initialize datepicker. Script is stored in the child theme /js/ subdirectory, and depends on jQuery and the jquery-ui-datepicker script
- wp_enqueue_script('custom_datepicker', get_stylesheet_directory_uri() . '/js/custom-datepicker.js', array('jquery','jquery-ui-datepicker'));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement