I invariably get the values NaN-NaN-NaN returned in date fields of my submitted formloom contact forms. I understand that NaN means “Not a Number”, but have no idea why I get these bogus values instead of the real dates.
Do the date fields use a popup / date picker interface like this?
https://jqueryui.com/datepicker/
If so, then the problem you are seeing might indicate some people coming through your website using a web browser that isn’t compatible. They might not be seeing the date picker. So there are no dates being received from the user.
Yes, it is the formloom 2 date picker. I wasn’t aware that there are browsers out there incompatible with the picker.
Do you know whether it is a jquery incompatibility, or specifically a date picker one?
It doesn’t necessarily confirm it is a jQuery incompatibility. From my experience, jQuery UI has some of the best browser compatibility out there.
It might be as simple as someone arriving at your website without Javascript enabled (or using a browser like Opera Mini without full Javascript support) or a clash between two or more scripts on the same page.
As always, the key to resolving this type of issue is isolating the problem and then being able to replicate it.
If the option exists, make sure your date field is mandatory. Then even if the date picker is not shown, users should still be prompted to enter something in the box.
Good thinking, Will. Thanks for your input.
BTW, my date fields in the reservation forms (Arrival and Departure dates) are always mandatory.
I am phasing out Formloom 2 forms anyway, in favour of Formloom 3, so this may not be a problem anymore. We’ll see.