Date
<?php
$tea_content = array(
array(
'type' => 'date',
'title' => 'Once uppon a time...',
'id' => 'my_date_field_id',
'description' => 'A white rabbit was running...',
'format' => 'dd.mm.yyyy', //optional, "yyyy/mm/dd" by default
'default' => '24.04.2012',
'submit' => 'yyyy.mm.dd', //format stored in DB
),
);
![date-1.png 1234](https://files.readme.io/E6sRsaoRVy8iW1gpb4dh_date-1.png)
![date-2.png 1233](https://files.readme.io/eYNi8oLMSnKAnTS6v2K1_date-2.png)
Retrieve data
Using the _get_option('my_date_field_id')
method, you'll get (with a json_encode()
display):
"2014.04.24"
Updated less than a minute ago