1
Currently, if a module calls the xoopsform class and creates a date select box, and passes a non-date value as the initial value of the box, then the current date gets put in the box.
This makes it impossible to create a date select box that is blank, or has no date in it initially.
Not being able to initialize the date select box with a non-date value means that when the form submission is received, unless the user has specifically cleared a box and made it blank, the current date will be received (since the current date is the current default value).
The problem with that is that the module writer has no way of knowing if the current date is what the user actually picked, or if the user just ignored or neglected to fill in the date select box.
This change solves that problem by allowing the date select box to be initialized with a non-date value (ie: "" is recommended), and that results in YYYY-mm-dd being written into the box as the default value. The popup calendar defaults to the current date in this situation, but the box itself does not contain the current date unless the user specifically selects the current date in the calendar (or types it in).
It's a pretty simple patch, just a few lines changed in two files. You can get it and read more here:
http://sourceforge.net/tracker/?func=detail&aid=1077123&group_id=41586&atid=430842The link is at the bottom of the page.
Of course, we would like to see this integrated with XOOPS 2.0.9 or later. It doesn't adversely affect existing modules, and allows module writers more accuracy in handling dates using the xoopsform class.
--Julian