Date

date kirki

The Date control allows you to select a date. The returned value is a string.

Example

new \Kirki\Field\Date(
	[
		'settings'    => 'date_setting',
		'label'       => esc_html__( 'Date Control', 'kirki' ),
		'description' => esc_html__( 'This is a date control.', 'kirki' ),
		'section'     => 'section_id',
		'default'     => '',
	]
);

Usage

<?php
$date = get_theme_mod( 'date_setting', '2019-01-30' );
echo esc_html( $date );
?>

Was this helpful?