Class DateRangeCustomFieldType
Defines the date range 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.options[from]
- (array) the option values passed to thedatepicker()
jQuery method, which applies to the From input.options[to]
- (array) the option values passed to thedatepicker()
jQuery method, which applies to the To input.
Example
array( // Single date_range picker 'field_id' => 'date_range', 'title' => __( 'Date Range', 'admin-page-framework-field-type-pack' ), 'type' => 'date_range', ), array( // Single date_range picker 'field_id' => 'date_range_repeatable', 'title' => __( 'Repeatable Date Range', 'admin-page-framework-field-type-pack' ), 'type' => 'date_range', '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/DateRangeCustomFieldType.php
Since: 1.0.0
Located at custom-field-types/date-time-custom-field-types/DateRangeCustomFieldType.php
Methods summary
protected
|
|
protected
|
|
protected
|
|
protected
|
|
protected
|
|
protected
|
|
protected
|
|
protected
|
#
_getDatePickerEnablerScript( mixed $sInputID, mixed $sDateFormat, 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.
|