4
What browser are you using? I think this is a bug in the HTML that is only rearing it's head in a particular browser, maybe IE 7?
Here's the thing, the calendar '...' buttons are listed as "type=reset", and the behaviour you're describing is exactly what you'd expect a reset button to do in a form. But the onclick event should (and normally does) override the behaviour of the reset button. Instead, the button simply does whatever the javascript function returns, which should be the typical calendar that we know and love.
However, in your case, the javascript is failing. This could be because your site has a problem with accessing the javascript function that shows the calendar (did you put the <{$calendarjs}> smarty tag into your main page template when you installed the datebox patch?).
Or it could be that the browser you are using is deciding that the 'reset' status of the button should override whatever onclick events the button has.
Or both.
So the first thing to do is make sure the javascript function is available. So make sure that <{$calendarjs}> is in your main page template. Right before the
tag is recommended.
If you do that, check the page source after going to the form, to make sure the change is picked up. You should have a lot of javascript code near the top, including a line like this:
function showCalendar(id) {
If you don't have that even after making the change, make sure your templates are being read properly and you don't have any cached or compiled templates or other files getting in the way. Check the FAQ on this site for help making sure changes are reflected in your live site.
If you do have that javascript in the page now, and you click the button and you still get the reset behaviour and not the calendar behaviour, then you need to fix that HTML bug in the date select box, which should never have been written that way in the first place in my opinion, I'm sorry we didn't correct it when we made our datebox patch.
Anyway, go to class/xoopsform/formtextdateselect.php and change the text near the bottom that says type='reset' to type='button'.
If you do that, and then try to click the calendar button, I sure hope it works!
Make sense?
--Julian