jquery-mobile-datepicker-wrapper icon indicating copy to clipboard operation
jquery-mobile-datepicker-wrapper copied to clipboard

The popup datepicker positions itself behind checkboxes

Open bjartekv opened this issue 11 years ago • 9 comments

The popup datepicker positions itself behind checkboxes. Seems that this should be fixable by forcing a higher z-index on the datepicker div. But maybe there is a better way already built into jquery mobile?

croppercapture 2

http://jsbin.com/uzaret/1292/edit

bjartekv avatar Feb 08 '14 12:02 bjartekv

The label of the checkbox has z-index=2, so there's no other way to fix it. You have to change the z-index of the datepicker to 2 or the z-index of the checkbox to 1. I prefer the first solution.

indrimuska avatar Feb 08 '14 15:02 indrimuska

There is a datepicker_getZindex function in the ui datepicker which is supposed to ensure it has the proper z-index to show above anything else on the page. For some reason its failing to properly calculate here. working on figuring out why.

arschmitz avatar Feb 08 '14 15:02 arschmitz

Thanks for looking into it. The datepicker_getZindex function seems to work correctly though if a parent element is absolutly positioned such as in the case with a datepicker inside popup http://jsbin.com/uzaret/1298/edit.

bjartekv avatar Feb 09 '14 12:02 bjartekv

still working on a workaround for this

arschmitz avatar Mar 13 '14 12:03 arschmitz

Any updates on this? It appears to be an issue with radio buttons too. I have tried various workarounds with the z-index to no avail...Thanks!

jecole avatar May 22 '14 03:05 jecole

The workaround proposed by indrimuska is the best solution I've found so far. http://jsbin.com/uzaret/1925/edit

bjartekv avatar May 22 '14 17:05 bjartekv

set the z-index to a high value. in my case this solved the issue.

#ui-datepicker-div { z-index: 9999 !important; }

amarkarian avatar Nov 19 '14 22:11 amarkarian

@amarkarian yes thats the best solution at the moment

arschmitz avatar Nov 19 '14 22:11 arschmitz

hint: if you want to avoid keyboard popup on iPad, just add onfocus="this.blur();" attribute to the input like this <input data-role="date" type="text" onfocus="this.blur();" ...

@Alexander: Another topic; in some - not reproducable cases - the current year turns after clicking the < button to 1800. Any Idea?

amarkarian avatar Nov 19 '14 22:11 amarkarian