#3047 closed bug (fixed)
DatePicker in UI 1.5.1 does not cancel button click
Reported by: | anup | Owned by: | kbwood |
---|---|---|---|
Priority: | critical | Milestone: | 1.5.2 |
Component: | ui.core | Version: | 1.5.1 |
Keywords: | datepicker, button | Cc: | |
Blocked by: | Blocking: |
Description
In the latest jquery UI, 1.5.1, I use a date picker using the following options:
{ dateFormat: 'yy-mm-dd', showOn: 'button', buttonText: '…' };
This renders a button correctly next to the input box.
However, clicking the button causes the page to submit.
If I return false in the trigger, then this problem goes away.
For example, the current code is this in the DatePicker :
(Line 345)
trigger.click(function() {
if ($.datepicker._datepickerShowing && $.datepicker._lastInput == target)
$.datepicker._hideDatepicker();
else
$.datepicker._showDatepicker(target);
});
If I simply add return false after the if/else, then it works.
Change History (3)
comment:1 Changed 15 years ago by
Owner: | changed from paul to kbwood |
---|---|
Status: | new → assigned |
comment:2 Changed 15 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:3 Changed 15 years ago by
Milestone: | → 1.5.2 |
---|
Note: See
TracTickets for help on using
tickets.
Fixed in r406.