I’d like users to be able to select multiple dates in the date picker. Using this plugin https://github.com/dubrox/Multiple-Dates-Picker-for-jQuery-UI I can now select multiple dates, however, when I submit the form I’m getting a validation error. Any suggestions or ideas on how I can make this work? Thanks in advance.
Hey Ty,
You could try assign this custom date picker to a Single Line Text field, which doesn’t have any specific format validation like the Date field does.
2 Likes
You can also use this filter to change how that field is validated or even disable validation for it.
2 Likes
Could you please provide me an example of what I would use in order to disable the validation for the datepicker? I looked at the link you provided but I’m not familiar enough with jQuery.
Here is an example:
add_filter( 'gform_field_validation_10_16', 'disable_datepicker_validation' );
function disable_datepicker_validation( $result, $value, $form, $field ) {
$result['is_valid'] = true;
return $result;
}
You will need to replace 10 with your form ID and 16 with the datepicker field ID.
2 Likes