date

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

Example

Kirki::add_field( 'theme_config_id', [
	'type'        => '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 );
?>

Last updated on: May 10th, 2020

Scroll to Top

Download

Subscribe & be the first to be informed about
new features & updates!