Disable Any theme timepicker

Disable Any theme timepicker

This guide will help you disable a particular theme timepicker and get back to the default one that is offered by the plugin.

To disable the theme timepicker, follow the below mentioned steps:

  1. Open your child theme,
  2. Add the code into the funtions.php file.
  1. function remove_divi_timepicker_on_event_page() {
  2. ​global $post_type;
  3. ​if($post_type == 'event_listing')
  4. ​{
  5. ​    wp_dequeue_script('et_bfb_admin_date_addon_js');
  6. ​    wp_dequeue_script('et_pb_admin_date_addon_js'); 
  7. ​    wp_deregister_script('et_bfb_admin_date_addon_js');
  8. ​    wp_deregister_script('et_pb_admin_date_addon_js'); 
  9. ​} 
  10. ​}
  11. 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.