Skip to main content

Search and Top Navigation

#8445 closed bug (invalid)

Opened July 16, 2012 03:58PM UTC

Closed November 03, 2012 08:52AM UTC

jQuery datepicker doesn't work properly due to the presence of a text input

Reported by: Cupidvogel Owned by: Cupidvogel
Priority: minor Milestone: 1.11.0
Component: ui.datepicker Version: 1.8.21
Keywords: Cc:
Blocked by: Blocking:
Description

I am using the following code to select a date range using 2 inline datepickers. There are two date fields (div, with class dateheader). When a date is selected, that datepicker slides up. Basically when the date div is clicked, first it is checked whether the corresponding datepicker is already viewable (through the ''fromclicked'' and ''toclicked'' variables), if present, then slide it up, else slide it down, changing the corresponding ''clicked'' attribute accordingly, and before doing either, sliding the other datepicker up and setting its corresponding ''clicked'' attribute to 0. Now there is a text input at the bottom of the code. When it is excluded, the code works fine, as expected. However if it is included, the code breaks, i.e if you click one date div, then select a date from the datepicker, it will slide up correctly. Then if you click the other date div, the datepicker will slide down alright, but selecting a date won't slide it up. I am at my wit's end. Where is the bug? The complete code is at http://jsfiddle.net/Cupidvogel/2ppYb/ (I couldn't include the UI-CSS files like the UI darkness theme file and related images, but even the unstyled version is enough!).

Attachments (0)
Change History (8)

Changed July 16, 2012 04:13PM UTC by scottgonzalez comment:1

owner: → Cupidvogel
status: newpending

Can you try again to explain the problem? Please do not explain the code. Explain the use case, steps to reproduce, and expected and actual results.

Changed July 16, 2012 04:20PM UTC by Cupidvogel comment:2

status: pendingnew

Replying to [comment:1 scott.gonzalez]:

Can you try again to explain the problem? Please do not explain the code. Explain the use case, steps to reproduce, and expected and actual results.

When you click on the first date div, the datepicker slides down, you select a date, it slides up and the div displays the selected date. Now you click the second date div, the datepicker slides down, you select a date, but the datepicker doesn't slide up. This point onwards, the slide on either div stops working. But the date selection constraints hold, since both the divs will now be showing, you can see that they work, if you choose date in one, the other gets modified to maintain the relation that the second date can't be less than the first date. But the sliding stops. If you comment out the text input, it doesn't happen, and everything works fine.

Changed July 16, 2012 04:40PM UTC by scottgonzalez comment:3

status: newpending

That example is still fairly complicated and the bug originates in your show/hide logic. Please reduce this further or ask for help on the forums or StackOverflow.

Changed July 16, 2012 04:51PM UTC by Cupidvogel comment:4

status: pendingnew

Replying to [comment:3 scott.gonzalez]:

That example is still fairly complicated and the bug originates in your show/hide logic. Please reduce this further or ask for help on the forums or StackOverflow.

The bug lies in the show/hide part, so that has to be there! The code works fine if you don't include the text input, but if you do, all sorts of problems occur, like I said. That reminds one of some probable class/id clash, but check it out, the text input has no class or id mentioned, just the mere presence of it does the trick. That sure sounds like a bug.

Changed July 16, 2012 05:32PM UTC by Cupidvogel comment:5

Further updation, the error persists only with text or password input, if you change the input type to radio or checkbox, it works fine. Console shows an error statement a is undefined, and points out to the first line of the datepicker js part in the minified UI file.

Changed October 11, 2012 02:45PM UTC by scottgonzalez comment:6

milestone: 1.9.01.11.0

Changed October 19, 2012 08:32PM UTC by mikesherov comment:7

status: newpending

I need some more information to properly debug this. Can you reduce this test case down further and provide a new fiddle showing the problem with as minimal of your own code as possible? Also, please use the non minified version of jQuery UI so you can provide a useful error message. Thanks again!

Changed November 03, 2012 08:52AM UTC by trac-o-bot comment:8

resolution: → invalid
status: pendingclosed

Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!