Ticket #3047 (closed bug: fixed)

Opened 6 years ago

Last modified 6 years ago

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:
Blocking: Blocked by:

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

comment:1 Changed 6 years ago by paul

  • Owner changed from paul to kbwood
  • Status changed from new to assigned

comment:2 Changed 6 years ago by paul

  • Status changed from assigned to closed
  • Resolution set to fixed

Fixed in r406.

comment:3 Changed 6 years ago by paul

  • Milestone set to 1.5.2
Note: See TracTickets for help on using tickets.