Closed nathanp closed 3 years ago
If I modify the includes\libraries\ct-meta-box\ct-meta-box.php file, lines 993 and 996 to enqueue the timepicker files later by using 9999 for the load order, then it works.
E.g.
wp_enqueue_style( 'jquery-timepicker', trailingslashit( CTMB_URL ) . 'css/jquery.timepicker.css', false, $this->version, 9999 ); // bust cache on update
wp_enqueue_script( 'jquery-timepicker', trailingslashit( CTMB_URL ) . 'js/jquery.timepicker.min.js', false, $this->version, 9999 ); // bust cache on update
Turns out it's just the JS file that needs to be enqueued later, not the CSS. My temporary workaround was to copy the JS file from the CTC plugin to my project, dequeue the script from the CTC Plugin, and then enqueue the script from my project.
Thank you, I'll give this a look at some point.
When the Advanced Custom Fields plugin is activated, the time picker for events does not display correctly. Apparently, the ACF plugin also has styles for the jQuery UI time picker and is overriding the styles from the ct-meta-box/css/jquery.timepicker.css file. Advanced Custom Fields is a very common plugin for not only developers, but many themes utilize it. I'm assuming the best solution would be to add some type of "ctc" class to the timepicker to make it's styling more unique and less prone to interference from other potentially active plugins.