Admin Page Framework - Field Type Pack Documentation
  • Package
  • Class

Packages

  • AdminPageFrameworkFieldTypePack
    • CustomFieldType

Classes

  • AutoCompleteCustomFieldType
  • DateCustomFieldType
  • DateRangeCustomFieldType
  • DateTimeCustomFieldType
  • DateTimeRangeCustomFieldType
  • DialCustomFieldType
  • EDDSoftwareLicensingCustomFieldType
  • FontCustomFieldType
  • GeometryCustomFieldType
  • GridCustomFieldType
  • ImageCheckboxCustomFieldType
  • ImageRadioCustomFieldType
  • LinkCustomFieldType
  • RevealerCustomFieldType
  • TimeCustomFieldType
  • TimeRangeCustomFieldType

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 the datepicker() 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

Methods summary

protected
# setUp( )

Loads the field type necessary components.

protected
# getEnqueuingScripts( )

Returns an array holding the urls of enqueuing scripts.

protected
# getEnqueuingStyles( )

Returns an array holding the urls of enqueuing styles.

protected
# getScripts( )

Returns the field type specific JavaScript script.

protected
# getIEStyles( )

Returns IE specific CSS rules.

protected
# getStyles( )

Returns the field type specific CSS rules.

protected
# getField( mixed $aField )

Returns the output of this field type.

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.
Admin Page Framework - Field Type Pack Documentation generated by ApiGen 2.8.0