acf_field_date_picker::initializepublicACF 5.0.0

This function will setup the field type data

Method of the class: acf_field_date_picker{}

No Hooks.

Returns

null. Nothing (null).

Usage

$acf_field_date_picker = new acf_field_date_picker();
$acf_field_date_picker->initialize();

Changelog

Since 5.0.0 Introduced.

acf_field_date_picker::initialize() code ACF 6.8.8

function initialize() {

	// vars
	$this->name          = 'date_picker';
	$this->label         = __( 'Date Picker', 'acf' );
	$this->category      = 'advanced';
	$this->description   = __( 'An interactive UI for picking a date. The date return format can be customized using the field settings.', 'acf' );
	$this->preview_image = acf_get_url() . '/assets/images/field-type-previews/field-preview-date-picker.png';
	$this->doc_url       = acf_add_url_utm_tags( 'https://www.advancedcustomfields.com/resources/date-picker/', 'docs', 'field-type-selection' );
	$this->defaults      = array(
		'display_format'          => 'd/m/Y',
		'return_format'           => 'd/m/Y',
		'first_day'               => 1,
		'default_to_current_date' => 0,
	);
}