Datepicker not appearing in admin

Support General Datepicker not appearing in admin

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #2829
    chillifishchillifish
    Participant

    I have a datepicker appearing in a custom post type, however, when I click on the input in the admin screen, the datepicker doesn't load.

    
    	$meta_boxes[] = array(
            'id'       		=> 'events',
            'title'    		=> 'Event details',
            'post_types'    => 'Events',
            'context'  		=> 'normal',
            'priority' 		=> 'high',
    
    		'fields'     => array(
            	array(
    				'name'		=> 'Event date',
    				'desc'		=> 'Date of event',
    				'id'		=> $prefix . 'event_date',
    				'type'		=> 'date',
    				'timestamp'	=> true,
                ),
    		),
    	);
    

    I have tried adding

    
    				'js_options' => array(
    					'showButtonPanel' => true,
    				),
    

    But it hasn't made any difference

    #2837
    Anh TranAnh Tran
    Keymaster

    Hi @chillifish, is there any JavaScript error in the console?

    #2840
    chillifishchillifish
    Participant

    No, that was my first thought. The only error was related to a server error in delivering the favicon, but having fixed that, the only message in the console is:

    JQMIGRATE: Migrate is installed, version 1.4.0

    #2843
    Anh TranAnh Tran
    Keymaster

    Just found 1 thing: the post_types parameter should be lowercase, similar to slug. Can you try changing its value to event?

    #2847
    chillifishchillifish
    Participant

    Brilliant, that's done it, many thanks! One more question while I'm here… I have chosen timestamp and it's pre-filled Jan 1st 1970, is there a way to default to today's date?

    #2848
    Anh TranAnh Tran
    Keymaster

    Hmm, it's a bug. It should show empty box instead of 1/1/1970.

    While waiting for the fix, I think you can try set std to time() to make it shows today's date.

    #2859
    chillifishchillifish
    Participant

    That's worked, thanks. It would be better if it were empty, so look forward to the fix!

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Datepicker not appearing in admin’ is closed to new replies.