I am working on configuration page for the custom module, using datepicker with date module.
When i set #date_format to 'd-m-Y' its ok, i need a day-month-year format but when i submit form and trying to get variable from variable_get(), i see only year-month-day format,
GOAL: i need this variable to show up as default value or maybe placeholder in proper date format ('d-m-Y'),
minor goal: also i want this datepicker not showing up "today" but i need date position in calendar to stick on variable from variable_get(). Thanks!
function mymodule_admin($form, &$form_state) {
$form['mymodule_start_date'] = array(
'#type' => 'date_popup',
'#title' => t('Start date'),
'#date_format' => 'd-m-Y',
'#attributes' => array('placeholder' => variable_get('mymodule_start_date'),
'#datepicker_options' => array('maxDate' => 0),
'#date_year_range' => '-3:+0',
'#date_label_position' => 'above',
'#theme_wrappers' => array('date_popup'),
'#required' => TRUE,
);
return system_settings_form($form);
};
EDIT: my resource datepicker API