Class TimeCustomFieldType
Defines the time field type.
Field Type Specific Arguments
time_format
- (string) date format default:H:mm
.options
- (array) the option values passed to thedatetimepicker()
jQuery plugin method.
Example
array( // Single time picker 'field_id' => 'time', 'type' => 'time', 'title' => __( 'Time', 'admin-page-framework-field-type-pack' ), 'time_format' => 'H:mm', // H:mm is the default format. ), array( // Repeatable time picker fields 'field_id' => 'time_repeatable', 'type' => 'time', 'title' => __( 'Repeatable Time Fields', 'admin-page-framework-field-type-pack' ), 'repeatable' => true, 'options' => array( 'hourGrid' => 4, 'minuteGrid' => 10, 'timeFormat' => 'hh:mm tt', ), 'description' => __( 'The grid option is set.', 'admin-page-framework-field-type-pack' ), ), array( // Sortable 'field_id' => 'time_sortable', 'type' => 'time', 'title' => __( 'Sortable', 'admin-page-framework-field-type-pack' ), 'sortable' => true, 'options' => array( 'hourMin' => 8, 'hourMax' => 16, ), 'description' => __( 'The maximum and minimum hours are set.', 'admin-page-framework-field-type-pack' ), array(), // the second item array(), // the third item ),
Package: AdminPageFrameworkFieldTypePack\CustomFieldType
Since: 1.0.0
See: http://trentrichardson.com/examples/timepicker/#tp-options
Located at custom-field-types/date-time-custom-field-types/TimeCustomFieldType.php
Since: 1.0.0
See: http://trentrichardson.com/examples/timepicker/#tp-options
Located at custom-field-types/date-time-custom-field-types/TimeCustomFieldType.php
Methods summary
protected
|
|
protected
|
|
protected
|
|
protected
|
|
protected
|
|
protected
|
|
protected
|
|
protected
|
#
_getTimePickerEnablerScript( mixed $sInputID, mixed $sTimeFormat, mixed $asOptions )
A helper function for the above getDateField() 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.
|