What is the propre way to include jQuery UI Datepicker's CSS in plugin?
I was looking for a datepicker, I read in another question's answer that jQuery UI's DatePicker is included in WordPress.
To make it work I needed to add in script inclusions
wp_enqueue_script('jquery-ui-datepicker');
But now it's missing .css,
I tried to add this in styles inclusions
wp_enqueue_style('jquery-ui-datepicker');
but it didn't work.
In the WordPress I'm working on, I found however thousands of references for datepicker. In the end I'm using this for now:
wp_enqueue_style( 'jquery-ui-datepicker', plugin_dir_url(__DIR__) . 'jetpack/modules/contact-form/css/jquery-ui-datepicker.css' );
But I feel like there must be a more "WordPress-native" syntax which I'd like to know.
Topic datepicker jquery css Wordpress
Category Web