I'm using custom form for getting results from a web service.
This is a part of my form
<?php
$form['starting_date'] = array(
'#type' => 'date_popup',
'#title' => 'Starting date',
'#date_format' => 'd.m.Y',
)
As you can see I'm using the date_popup from the Date module.
It's displaying correct with this format d.m.Y. but after submitting the form, I've got error from a web service, because the string I'm passing . form_state['values']['starting_date'] .
on print, the values are with different format.
Lets say a user selects 10.02.2014 (today), the form_state displays as 2014-10-02.
How can I fix that? The web service has to receive only with this format d.m.Y to display the results, otherwise it doesn't work.