Skip to main content

Search and Top Navigation

#6988 closed bug (fixed)

Opened February 14, 2011 04:15PM UTC

Closed February 15, 2011 01:40PM UTC

Last modified October 17, 2012 05:11AM UTC

Datepicker: Treat all hidden text fields the same

Reported by: severin Owned by: severin
Priority: minor Milestone: 1.8.10
Component: ui.datepicker Version: 1.8.9
Keywords: Cc:
Blocked by: Blocking:
Description

File : jquery.ui.datepicker.js In function _findPos (line 755)

"jQuery.expr.filters.hidden(obj)" must be added to test hidden text inputs.

  • while (obj && (obj.type == 'hidden' || obj.nodeType != 1)) {

+ while (obj && (obj.type == 'hidden' || obj.nodeType != 1 **|| jQuery.expr.filters.hidden(obj)**)) {

Attachments (0)
Change History (9)

Changed February 14, 2011 04:18PM UTC by severin comment:1

while (obj && (obj.type == 'hidden' || obj.nodeType != 1 **|| jQuery.expr.filters.hidden(obj)**)) {

Changed February 14, 2011 09:39PM UTC by scottgonzalez comment:2

owner: → severin
status: newpending

Can you explain the use case for showing a datepicker that is tied to an element that's hidden?

Changed February 15, 2011 08:56AM UTC by severin comment:3

status: pendingnew

HTML :

<input type="text" name="date" class="datepicker" />

CSS :

.datepicker{
    display:none;
}

JS :

$('.datepicker').datepicker({showOn:'button'});

Changed February 15, 2011 09:01AM UTC by severin comment:4

The purpose of this is to display only the button (not the input).

But it's only a design hidden. For most of the views using this componant, the input is displayed, the designer wants to hide it only on one view and he only has CSS to do so.

What happen today : the datepicker pop in the top left corner.

Changed February 15, 2011 01:37PM UTC by scottgonzalez comment:5

status: newopen
summary: Error in datepicker position for hidden text inputs - _findPos()Datepicker: Treat all hidden text fields the same

Changed February 15, 2011 01:40PM UTC by Scott González comment:6

resolution: → fixed
status: openclosed

Datepicker: Properly handle datepickers attached to inputs that are hidden using CSS. Fixes #6988 - Datepicker: Treat all hidden text fields the same.

(cherry picked from commit 6fbee255d8d895c7e84a4b2eaad2cfadc8a3425a)

Changeset: cf9dac6c1704150d40191573767e5bfa58dcd9d2

Changed February 15, 2011 01:40PM UTC by Scott González comment:7

Datepicker: Properly handle datepickers attached to inputs that are hidden using CSS. Fixes #6988 - Datepicker: Treat all hidden text fields the same.

Changeset: a3cba34a4d99756e7590fee391fee1bdf06d8a5f

Changed February 15, 2011 01:42PM UTC by scottgonzalez comment:8

milestone: 1.91.8.10

Changed October 17, 2012 05:11AM UTC by mikesherov comment:9

#5658 is a duplicate of this ticket.