Skip to content

Commit

Permalink
Merge pull request #2808 from CalderaWP/feature/2727
Browse files Browse the repository at this point in the history
Allow validation to be re-triggered on the date picker field #2727
  • Loading branch information
Josh Pollock authored Nov 20, 2018
2 parents e400df7 + a21b641 commit b622d62
Show file tree
Hide file tree
Showing 15 changed files with 35,597 additions and 33,613 deletions.
9 changes: 8 additions & 1 deletion assets/js/fields.js
Original file line number Diff line number Diff line change
Expand Up @@ -1693,7 +1693,14 @@ jQuery( document ).ajaxComplete(function() {
e.preventDefault();
$this.cfdatepicker('show')
.on('show', function(){ $(this).trigger('blur'); })
.on('hide', function(){ $(this).attr("disabled", false); })
.on('hide', function(){
$(this).attr("disabled", false);
if($this.hasClass('parsley-error') && $this.val() !== ''){
$this.removeClass('parsley-error');
$this.addClass('parsley-success');
$('#parsley-id-' + $this.data('parsley-id')).hide();
}
})
}
);

Expand Down
1 change: 1 addition & 0 deletions caldera-core.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ function caldera_forms_load()
add_action('plugins_loaded', array('Caldera_Forms', 'get_instance'));
add_action('plugins_loaded', array('Caldera_Forms_Tracking', 'get_instance'));

add_filter( 'caldera_forms_render_assets_minify', '__return_false' );

// Admin & Admin Ajax stuff.
if (is_admin() || defined('DOING_AJAX')) {
Expand Down
Loading

0 comments on commit b622d62

Please sign in to comment.