• Resolved olimax

    (@olimax)


    I have a Custom Post Type that I am using metaboxes with
    The CPT does not use the editor panel in the admin

    However without it the datepicker for the field type text_date_timestamp will not work
    My guess is that it relies on the editor to load the jqueryUI but I could be wrong

    Is there a workaround for this?
    Should not the field check and load the UI independently ?
    Thanks

    https://ww.wp.xz.cn/plugins/cmb2/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Hi olimax,

    I am not managing to recreate the issue. Don’t mind the terseness in some of the code spots below.

    https://cloudup.com/cndG0FoPPvB

    add_action( 'cmb2_admin_init', 'abc' );
    function abc() {
    	$prefix = 'whatev_';
    
    	$cmb = new_cmb2_box( array(
    		'id'            => '02_test',
    		'title'         => __( 'Test Metabox 2', 'cmb2' ),
    		'object_types'  => array( 'movie', ),
    	) );
    
    	$cmb->add_field( array(
    		'id' => $prefix . 'test',
    		'title' => 'Test',
    		'type' => 'text_date_timestamp'
    	));
    }

    My guess is that you have a javascript issue occurring on the page from another source and it’s preventing the CMB2 field from working properly. However, I would need more information like any errors shown in your browser’s javascript console, to be certain.

    Thread Starter olimax

    (@olimax)

    Much appreciated, Micheal
    You are right
    I thought I had js errors flagged but it was turned off in Firebug
    Turns out it was Yoast SEO. Their last bug fix 3.0.4 from a few days ago supposedly addressed it, specifically citing CMB2, but still the problem remains. Hopefully they will have another go
    I know which I would rather do without if it came to it
    I couldn’t work without your invaluable tool
    Many thanks

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Ah yeah, Team Yoast hasn’t had a fun week or so with that release. I’m keeping my eye on it as well for various reasons.

    Plugin Author Justin Sternberg

    (@jtsternberg)

    If you updated to 3.0.4 and still see the issue, I’d first clear your browser cache, and if you still see it, report the exact error to their support team.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Datepicker not working without editor’ is closed to new replies.