Class TimeRangeCustomFieldType
Defines the time range field type.
Field Type Specific Arguments
date_format
- (string) date format default:yy/mm/dd
.time_format
- (string) date format default:H:mm
.options
- (array) the option values passed to thedatetimepicker()
jQuery plugin method.options[from]
- (array) the option values passed to thedatetimepicker()
jQuery plugin method, which applies to the From input.options[to]
- (array) the option values passed to thedatetimepicker()
jQuery plugin method, which applies to the To input.
Example
array( // Single time_range picker 'field_id' => 'time_range', 'title' => __( 'Time Range', 'admin-page-framework-field-type-pack' ), 'type' => 'time_range', ), array( // Sortable and repeatable time_range picker 'field_id' => 'time_range_repeatable', 'title' => __( 'Repeatable Time Range', 'admin-page-framework-field-type-pack' ), 'type' => 'time_range', 'time_format' => 'HH:mm:ss', 'repeatable' => true, 'sortable' => true, ),
Package: AdminPageFrameworkFieldTypePack\CustomFieldType
Since: 1.0.0
Located at custom-field-types/date-time-custom-field-types/TimeRangeCustomFieldType.php
Since: 1.0.0
Located at custom-field-types/date-time-custom-field-types/TimeRangeCustomFieldType.php
Methods summary
protected
|
|
protected
|
|
protected
|
|
protected
|
|
protected
|
|
protected
|
|
protected
|
|
protected
|
#
_getDatePickerEnablerScript( mixed $sInputID, mixed $sTimeFormat, mixed $asOptions_From, mixed $asOptions_To )
A helper function for the above _replyToGetField() method. |
protected
|
#
_getSubOptions( mixed $sKey, array $aOptions )
Returns the option array of the given sub-option key. This is used for sub-option elements. In this field type, there are 'from' and 'to' sub-elements. The user can set the shared options in the first depth of the 'options' argument array. And in the first depth, the 'from' and 'to' argument arrays can be set and they take their precedence. |
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.
|