I formated a datepicker with this format : dateFormat: 'DD, d MM, yy'.
Then I have a form,
If user dont choose a date then it will assume the current date in this format: echo date('l, j F, Y - H:i:s'); and save in database.
If user fill the input date, so I want to save in database this filled date.
The problem is, in my database Im getting date like this: 0000-00-00 00:00:00.
Im trying to use strototime to convert date to timestamp but Im not having sucess doing this.
Do you know How we can do this?
<input type="text" class="datepicker" name="date" value="if(isset($_POST['date'])) echo strtotime($f['date']); else echo date('l, j F, Y - H:i:s'); ?>" />