No Styling for the datepicker in WordPress admin

Here ya go … try this:

        /* add jquery ui datepicker and theme */
        global $wp_scripts;
        wp_enqueue_script('jquery-ui-datepicker');
        $ui = $wp_scripts->query('jquery-ui-core');
        $url = "https://ajax.aspnetcdn.com/ajax/jquery.ui/{$ui->ver}/themes/redmond/jquery.ui.all.css";
        wp_enqueue_style('jquery-ui-redmond', $url, false, $ui->ver);

This is what I use in my plugin to load a theme. That CDN has all the basic jquery-ui themes.

Hope this helps …

Leave a Comment