I have an issue with the calendar when loading information from a database.
If you do not choose an actual date (i.e. date of birth, which is not required by the form) and save the information to the MySQL database, the date column defaults to 000-00-00 for the value of dob in the database.
When you load that information into the form, you get “-1-11-30” as the default date showing on the calendar field in the form. When you click on the input field for the calendar, the dates are all messed up and you cannot choose a correct date any more.
Is there a way to anticipate this from the script side and clear the date or reset the start date when the form loads if it sees “0000-00-00” coming in from the loader? I am using the form loader with a straight SQL call. $SQL = “SELECT * FROM profiles WHERE id = ‘4’”; so I cant change the value being pulled from the database.
I have tried the getItemValue(“dob”) on the form, but it says null because it pops up the alert before the form is fully loaded. When I pop up the alert on button click, it gives me the info based on “-1-11-30”…which is not an actual date.
Any help you can give me is great.