Item12007: Extensions.JSCalendarContrib: date form field tends to override default form button
Current State: Closed
Released In: 1.1.6
Target Release: patch
form fields (and also calendar popups generated using
to generate a button that opens the calendar popup. Unfortunately, that makes the button a form button and, in some cases, this button will steal the default action from the submit button.
In our case, we've got a date field in a data form and a submit button from a custom skin further down. If we press the enter key in any text field in the form, instead of submitting it, the calendar pops up. This has been quite confusing for our users.
I've hotfixed the issue by using CGI::img instead (removing the now irrelevant
attribute). Not sure whether this creates other issues, but seems okay for now.
- 20 Jul 2012
Using an img is the right thing to do. Here's some code to compare both:
using an input-type-image tag:
using an img tag:
- 23 Jul 2012