$arrayData['data_validade'] = date_format("Y-m-d",strtotime(str_replace('/','-',$this->$arrayData)));
But, this date_format works only for the current date, but I do not want the current date, I want the date the user informs through my datapicker.
Any suggestions?