I'm working on a PHP frontend for a PostgreSQL db and I'm looking for the
best way to create date or timestamp inputs. Let's take a date in the
format yyyy-mm-dd as an example. This is too error prone, I know my users
will do it wrong
<input type="text" name="fieldname">
Right now I'm thinking about something like this:
<input type="text" size="4" name="y_fieldname">-
<input type="text" size="2" name="m_fieldname">-
<input type="text" size="2" name="d_fieldname">
but this is IMO a very ugly solution, because after the SUBMIT I have to
glue all the parts together before inserting the values into the db.
Something like this:
<input type="text" format="yyyy-mm-dd" name="fieldname">
would be ideal, but AFAIK this doesn't exist in HTML. Can anybody give me
any tips? How did you solve this? Thanks!