fbpx
Black Friday Offer 20% offUse Coupon Code blackfriday2020 shop Now

How can we help?

Disable Any theme timepicker

The following guide helps you to disable a particular theme timepicker, and restore to default as provided by the plugin.

  1. Open your child theme,
  2. Add the code into the funtions.php file

    Here is an example field wherein you can disable the Divi theme time picker:

    <?php
    function remove_divi_timepicker_on_event_page() {
    global $post_type;
    if($post_type == 'event_listing')
    {
    	wp_dequeue_script('et_bfb_admin_date_addon_js');
    	wp_dequeue_script('et_pb_admin_date_addon_js');
    
    	wp_deregister_script('et_bfb_admin_date_addon_js');
    	wp_deregister_script('et_pb_admin_date_addon_js');	
    }
    
    }
    add_action( 'admin_enqueue_scripts', 'remove_divi_timepicker_on_event_page', 20 );
    ?>
    

For any other theme, You can change the code according to your theme script file.

Was this article helpful?
How can we improve this article?
Quick Links