Default Calendar Value

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?

Hello
This post will help you:
viewtopic.php?f=7&t=37393

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.

I feel like I’m missing something simple.

Thanks in advance!!

  • Brant

Please, provide us completed demo to test the issue
docs.dhtmlx.com/auxiliary_docs__ … pport.html