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
),
);
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