Class DateCustomFieldType
Defines the date field type.
Field Type Specific Arguments
date_format
- (string) date format default:yy/mm/dd
.options
- (array) the option values passed to thedatepicker()
jQuery method.
Example
array( // Single date picker 'field_id' => 'date', 'title' => __( 'Date', 'admin-page-framework-field-type-pack' ), 'type' => 'date', ), array( // Custom date format - use a unix timestamp. 'field_id' => 'date_custom_date_format', 'title' => __( 'Date Format', 'admin-page-framework-field-type-pack' ), 'type' => 'date', 'date_format' => '@', 'attributes' => array( 'size' => 16, ), ), array( // Repeatable date picker fields 'field_id' => 'date_repeatable', 'type' => 'date', 'title' => __( 'Repeatable', 'admin-page-framework-field-type-pack' ), 'repeatable' => true, 'date_format' => 'yy-mm-dd', // yy/mm/dd is the default format. 'options' => array( 'numberOfMonths' => 2, ), ), array( // Sortable date picker fields 'field_id' => 'date_sortable', 'type' => 'date', 'title' => __( 'Sortable', 'admin-page-framework-field-type-pack' ), 'sortable' => true, 'options' => '{ minDate: new Date(2010, 11, 20, 8, 30), maxDate: new Date(2010, 11, 31, 17, 30) }', array(), // the second item array(), // the third item ),
Package: AdminPageFrameworkFieldTypePack\CustomFieldType
Since: 1.0.0
See: http://api.jqueryui.com/datepicker/
Located at custom-field-types/date-time-custom-field-types/DateCustomFieldType.php
Since: 1.0.0
See: http://api.jqueryui.com/datepicker/
Located at custom-field-types/date-time-custom-field-types/DateCustomFieldType.php
Methods summary
protected
|
|
protected
|
|
protected
|
|
protected
|
|
protected
|
|
protected
|
|
protected
|
|
protected
|
#
_getDatePickerEnablerScript( mixed $sInputID, mixed $sDateFormat, mixed $asOptions )
A helper function for the above _replyToGetField() method. |
Magic methods summary
Properties summary
public
array
|
$aFieldTypeSlugs |
#
Defines the field type slugs used for this field type. |
protected
array
|
$aDefaultKeys |
#
Defines the default key-values of this field type. Remark
$_aDefaultKeys holds shared default key-values defined in the base class.
|