Class DateTimeRangeCustomFieldType
Defines the date-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 date_time_range picker 'field_id' => 'date_time_range', 'title' => __( 'Date Time Range', 'admin-page-framework-field-type-pack' ), 'type' => 'date_time_range', ), array( // Repeatable and sortable date_time_range picker 'field_id' => 'date_time_range_repeatable', 'title' => __( 'Repeatable Date Time Range', 'admin-page-framework-field-type-pack' ), 'type' => 'date_time_range', 'time_format' => 'HH:mm:ss', 'repeatable' => true, 'sortable' => true, 'options' => array( 'numberOfMonths' => 2, ), ),
Package: AdminPageFrameworkFieldTypePack\CustomFieldType
Since: 1.0.0
Located at custom-field-types/date-time-custom-field-types/DateTimeRangeCustomFieldType.php
Since: 1.0.0
Located at custom-field-types/date-time-custom-field-types/DateTimeRangeCustomFieldType.php
Methods summary
protected
|
|
protected
|
|
protected
|
|
protected
|
|
protected
|
|
protected
|
|
protected
|
|
protected
|
#
_getDatePickerEnablerScript( mixed $sInputID, mixed $sDateFormat, 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.
|