Skip to content

Gives theme developers a date picker custom value field with a few simple lines of code. This is predominantly based on a plugin by Kyle G : http://www.komprihensiv.com/adding-the-jquery-ui-datepicker-to-a-wordpress-metabox/

Notifications You must be signed in to change notification settings

timhodson/wordpress-datepicker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

wordpress-datepicker

Intro

This plugin is based on a plugin available from Kyle G.

The major changes are making it a freestanding configurable class object that can be called multiple times in your theme.

In theory you don't have to use this as a plugin, as it could be reworked as a standalone class in your theme distribution.

Usage

// always check that the class exists before you call it!
if(class_exists('metabox_datepicker') { 
  $myDatePicker = new metabox_datepicker($post_type, $custom_meta_name, $label_for_textbox, $label_for_admin_metabox);
}

// EXAMPLE: date picker fields for post type 'event'
if (class_exists('metabox_datepicker')){
  $event_start_date = new metabox_datepicker('event', 'event_start_date', 'Event start date', "Start Date");
  $event_end_date = new metabox_datepicker('event', 'event_end_date', 'Event end date', "End Date");
}

About

Gives theme developers a date picker custom value field with a few simple lines of code. This is predominantly based on a plugin by Kyle G : http://www.komprihensiv.com/adding-the-jquery-ui-datepicker-to-a-wordpress-metabox/

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published