Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#1642 closed defect (fixed)

[patch][cla]DropdownDatePicker: Fix for error when initial entry is invalid date

Reported by: guest Owned by: Adam Peller
Priority: high Milestone:
Component: Widgets Version: 0.3
Keywords: widget datepicker dropdowndatepicker Cc: tk
Blocked By: Blocking:


When DropdownDatePicker? receives an invalid date in its input, the current value in the DatePicker? is used instead. However, when the DropdownDatePicker? loads empty the DatePicker? has no value. So, entering an invalid date (i.e. random string) in the input generates a JS error because DropdownDatePicker? tries to set its input value to an undefined variable.

The attached patch should fix the problem. It checks to see if datePicker.value is defined. If so, it behaves as before. Otherwise, it simply blanks out the input.

Attachments (1)

dddp-no-selection.patch (811 bytes) - added by [email protected] 15 years ago.
The patch

Download all attachments as: .zip

Change History (8)

Changed 15 years ago by [email protected]

Attachment: dddp-no-selection.patch added

The patch

comment:1 Changed 15 years ago by [email protected]

Sorry, forgot to change "guest" to my email address when I created the ticket.

comment:2 Changed 15 years ago by bill

Milestone: 0.4.1
Owner: changed from bill to tk

comment:3 Changed 15 years ago by tk

Cc: tk added

This patch didnt work in my local tests... working on an alternate solution.

comment:4 Changed 15 years ago by Adam Peller

Owner: changed from tk to Adam Peller

comment:5 Changed 15 years ago by Adam Peller

Resolution: fixed
Status: newclosed

(In [6510]) Fixes #1642

comment:6 Changed 15 years ago by Adam Peller

Resolution: fixed

(In [6511]) Fixes #1642

comment:7 Changed 15 years ago by (none)

Milestone: 0.4.1

Milestone 0.4.1 deleted

Note: See TracTickets for help on using tickets.