When loading information from a mysql database, the default value for the date is 0000-00-00 in the database, which translates to “-1-11-30” when you load the information into the from.
Is there a way to fix that? If the script sees that the date is 0000-00-00 no input is placed into the calendar form?
I looked at that code and added the value: “” to mine, however I still get the same thing.
This is my json line
{type: “calendar”, value: “”, inputWidth: “100”, dateFormat: “%Y-%m-%d”, weekStart: 7, name: “anniversary”, label: “Anniversary:”, calendarPosition: “right” },
The date coming from the SQL Table is “0000-00-00”, and it displays as “-1-11-30” in the visible form. Which, as you can imagine totally messes up the calendar popup.
I’m loading the form with $formConn->render_sql and would like to continue doing that rather than switching to render_array. I figure I could reset the value from the table to empty and push that to the form, but that would mean fixing a lot of code to retrofit that.