Class Fieldmanager_Datepicker
A Javascript date-picker which submits dates as unix timestamps.
- Fieldmanager_Field
- Fieldmanager_Datepicker
Methods summary
public
|
#
__construct( array $label = '', array $options = array() )
Construct default attributes and enqueue javascript |
public
string
|
#
form_element( mixed $value )
Generate HTML for the form element itself. Generally should be just one tag, no wrappers. |
public
integer
|
|
public
string
|
|
public
string
|
|
public
string
|
Methods inherited from Fieldmanager_Field
_invalid_definition()
,
_unauthorized_access()
,
activate_submenu_page()
,
add_another()
,
add_meta_box()
,
add_page_form()
,
add_quickedit_box()
,
add_submenu_page()
,
add_term_meta_box()
,
add_user_form()
,
element_markup()
,
escape()
,
get_collapse_handle()
,
get_element_attributes()
,
get_element_id()
,
get_element_key()
,
get_element_label()
,
get_extra_element_classes()
,
get_form_name()
,
get_form_tree()
,
get_remove_handle()
,
get_sort_handle()
,
is_group()
,
is_repeatable()
,
preload_alter_values()
,
presave_all()
,
set_options()
,
single_element_markup()
,
wrap_with_multi_tools()
Magic methods summary
Properties summary
public
boolean
|
$use_time |
#
Collect time info or just date info? Defaults to just date info. |
public
boolean
|
$use_am_pm |
#
If true, and $use_time == true, and $date_element = 'dropdown', will render an 'AM' and 'PM' dropdown |
public
string
|
$date_format |
#
PHP date format, only used for rendering already-saved dates. Use js_opts['dateFormat'] for the date shown when a user selects an option. This option renders to '21 Apr 2013', and is fairly friendly to international users. |
public
boolean
|
$store_local_time |
#
By default in WordPress, strtotime() assumes GMT. If $store_local_time is
true, FM will use the site's timezone setting when generating the timestamp.
Note that |
public
array
|
$js_opts |
#
Options to pass to the jQueryUI Datepicker. If you change dateFormat, be sure that it returns a valid unix timestamp. Also, it's best to change js_opts['dateFormat'] and date_format together for a consistent user experience. Default: array( 'showButtonPanel' => True, 'showOtherMonths' => True, 'selectOtherMonths' => True, 'dateFormat' => 'd M yy', ); |
Properties inherited from Fieldmanager_Field
$add_more_label
,
$add_more_position
,
$attributes
,
$data_id
,
$data_type
,
$datasource
,
$debug
,
$default_value
,
$description
,
$description_after_element
,
$display_if
,
$escape
,
$extra_elements
,
$field_class
,
$index
,
$index_filter
,
$inline_label
,
$input_type
,
$is_attachment
,
$label
,
$label_after_element
,
$label_element
,
$limit
,
$meta_boxes_to_remove
,
$minimum_count
,
$name
,
$one_label_per_item
,
$remove_default_meta_boxes
,
$required
,
$sanitize
,
$save_empty
,
$serialize_data
,
$skip_save
,
$sortable
,
$template
,
$validate
,
$validation_messages
,
$validation_rules