Skip Navigation

[Resolved] Types datepicker css conflict with jqueryui theme

The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.
This support ticket is created 9 years, 7 months ago. There's a good chance that you are reading advice that it now obsolete.
This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 -
- - - - - - -

Supporter timezone: Asia/Karachi (GMT+05:00)

Tagged: 

This topic contains 4 replies, has 2 voices.

Last updated by francescoB-3 9 years, 7 months ago.

Assisted by: Waqas.

Author
Posts
#243940

Hi, I have installed the latest version of Types and this introduced a conflict with my jqueryui theme.
Types load in the website a personalized version of jqueryui datepicker, loading a javascript file and a css file, and that's a lot of rules that overwrite the css jqueryui theme, making it impossible to use a custom theme.
How can I disable the personalized datepicker?
Than you

#243985

Waqas
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Please consider using following sample code in your theme's functions.php:

function wpdocs_dequeue_script() {
   wp_dequeue_script( 'my-datepicker' ); // The slug of the script to dequeue
}
add_action( 'wp_print_scripts', 'wpdocs_dequeue_script', 100 );

For more information on 'wp_dequeue_script', please visit http://codex.wordpress.org/Function_Reference/wp_dequeue_script.

Please look into this thread for more details on this particular solution:

https://toolset.com/forums/topic/remove-unnecessary-js-includes-in-frontend/

Please let me know if I can help you with anything related.

#244211

Thanks for the quick reply!
I tried to follow the two tips above but without success ...
I tried the code

add_action( 'init', 'my_cleanup', 11 );
function my_cleanup() {
		wp_dequeue_style( 'wptoolset-field-datepicker' );
}

and also

function wpdocs_dequeue_script() {
   wp_dequeue_script( 'wptoolset-field-datepicker' );
}
add_action( 'wp_print_scripts', 'wpdocs_dequeue_script', 100 );
<(code>

but both do not solve the problem, the CSS file

[php]
<em><u>hidden link</u></em>

loaded by Types continues to be loaded.
Do you have other ideas?

#244258

Waqas
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

I am sorry if it didn't work, however, there's another work-around. Please try the following code in your functions.php:

wp_deregister_style('wptoolset-field-datepicker');

I hope this will help resolving the issue. Please let me know for help on anything related.

#244976

Hi, I have founded the correct code to use for prevent the load of the CSS file of Types in the frontend:

add_action( 'wp_enqueue_scripts', 'remove_default_stylesheet', 25 );
function remove_default_stylesheet() {
    wp_dequeue_style( 'wptoolset-field-datepicker' );
    wp_deregister_style( 'wptoolset-field-datepicker' );
}

However the problem of CSS loading is present in the version 1.6.2 of Types, now the current version 1.6.3 resolve this problem.
Thank you very much for the assistance!

The forum ‘Types Community Support’ is closed to new topics and replies.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.