Skip to main content

Search and Top Navigation

#3047 closed bug (fixed)

Opened June 29, 2008 07:11PM UTC

Closed July 04, 2008 05:52PM UTC

Last modified July 04, 2008 05:52PM UTC

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.

Attachments (0)
Change History (3)

Changed June 30, 2008 08:13PM UTC by paul comment:1

owner: paulkbwood
status: newassigned

Changed July 04, 2008 05:52PM UTC by paul comment:2

resolution: → fixed
status: assignedclosed

Fixed in r406.

Changed July 04, 2008 05:52PM UTC by paul comment:3

milestone: → 1.5.2