Tagged: datepicker, enfold, gravity forms
Hi
I like the style of the datepicker in an enfold form but for added functionality I am using gravity forms
But the default datepicker in gravity forms is not very nice
How do I apply the style of the Enfold datepicker to the datepicker on Gravity form?
Hey briandeeney,
Sorry for the very late reply, and thanks for the links to the two test pages. So to try and make the Gravity Forms datepicker look like the Enfold datepicker we first need to add the Enfold class avia-datepicker-div
to the datepicker so the Enfold css will apply.
You are welcome to try this by adding this code to the end of your functions.php file in Appearance > Editor:
function custom_datepicker_script(){
?>
<script>
(function($){
$('.ginput_container_date').click(function() {
$('body').find('#ui-datepicker-div').addClass('avia-datepicker-div');
});
})(jQuery);
</script>
<?php
}
add_action('wp_footer', 'custom_datepicker_script');
You will see that this helps, but your Gravity Forms css is still overriding some of the elements of the datepicker and it also looks like you are using site caching so it’s a little hard to tell.
Please disable all caching and compression so we can investigate further.
Please remove the script above after if you test it, I will probably need to adjust it further.
Best regards,
Mike