Issue
I need to let the users pick a date (preferable in the format dd/mm/yy) and I decide to try out new HTML5 input date type. However I don't know how to interpret the value it gives on the server side. The value I get is yyyy-mm-dd. How can I do this?
What if the user uses an older browser that does not support it, how will they enter the date?
Solution
Just convert the date using PHP's date functionality (
date(),DateTime, etc)$datetime = new DateTime('2012-12-06');$new_date = $datetime->format('d/m/Y');They will see a plain text field. It will be up to you to make sure they enter a validate date.
Answered By - John Conde
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.