Skip Navigation

[Gelöst] Date selector obscured by header on mobile devices

Dieser Thread wurde gelöst. Hier ist eine Beschreibung des Problems und der Lösung.

Problem:
On small screens the date picker UI is partly obscured on the client's site by the header, which is rendered on top of the date picker.

Solution:
The theme in question sets a very high z-index for its header.

The solution is either to set a more sensible z-index for the header, or increase the z-index of the date picker to a higher level, with the following:

.ui-datepicker.ui-widget-content {
    z-index: 100000 !important;
}
This support ticket is created vor 6 Jahre, 2 Monate. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Heute stehen keine Supporter zur Arbeit im Werkzeugsatz-Forum zur Verfügung. Sie können gern Tickets erstellen, die wir bearbeiten werden, sobald wir online sind. Vielen Dank für Ihr Verständnis.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+01:00)

Dieses Thema enthält 6 Antworten, hat 2 Stimmen.

Zuletzt aktualisiert von davidZ-4 vor 6 Jahre, 2 Monate.

Assistiert von: Nigel.

Author
Artikel
#623553
date picker issue.jpg

I am trying to: select a date for a custom field on a mobile device (iphone 6 and Windows phone)

Link to a page where the issue can be seen: versteckter Link

I expected to see: the date selector to render properly and show the year and month sectors

Instead, I got: only days calendar view. see enclosed image

repro steps:
on a mobile device (smartphone)
go to versteckter Link
use the following:
User - test
Password - test!!1122@@
go to versteckter Link
select the date picker

Thanks,

David

#623569

Nigel
Supporter

Sprachen: Englisch (English ) Spanisch (Español )

Zeitzone: Europe/London (GMT+01:00)

Hi David

I looked on my phone and saw the issue (odd that it displays differently on a real device than in a mobile simulator in the desktop browser).

Two observations.

The first is that if the date field were further down the page I'm not sure it would be an issue.

In any case the cause of the issue is that the header has a very high z-index value which means it appears on top of the datepicker UI, obscuring the top part of it.

See the screenshot.

Such a high z-index seems superfluous to me and if you overwrite it to set the z-index back to a low number like 1 then I think it will solve the problem. You could actually lower it to 9999 and I think it should still work.

If you do notice any unexpected side-effects then let me know.

#624113

Hi Nigel,
thanks for the quick response.
i have to put the date picker at the top of the page as its act as a condition to display other things on the page below.
here is how the date picker z-index is currently defined (using F12).

<div class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all" id="ui-datepicker-div" style="left: 435px; top: 325.27px; display: block; position: absolute; z-index: 1;">

I couldn't find any z-index on the header. I search the page for the "z-index" and found only the following:
instead i found this on the page

<style>
...
		.toolset-google-map-preview .toolset-google-map-preview-reload {
			display: none;
			overflow: hidden;
			position: absolute; 
			top: 0px; 
			left: 0px; 
			right: 0px; 
			bottom: 0px; 
			text-align: center;
			background-color: #ccc;
			background-image: url(//stage.equiblocks.com/wp-content/plugins/toolset-maps/resources/images/powered-by-google-on-toolset-reload.png);
			background-position: 50% 40%;
			background-repeat: no-repeat;
			z-index: 1000;
		}
		.toolset-google-map-preview .toolset-google-map-preview-reload a {
			display: block;
			position: absolute;
			top: 0;
			left: 0;
			right: 0;
			bottom: 0;
			cursor: pointer;
			margin-left: -999999px;
		}
		/* Autocomplete inside dialogs z-index fix */
		.pac-container {
			z-index: 100150;
		}
....
		</style>

I'm not sure how to change the z-index for the header and i rather not change the theme z-index.

as toolset set the z-index of the date picker to 1 i think i this should be increased to solve the problem. the questions is how do i set it it up in my css to override the current z-index set by toolset?

any thoughts?

David

#624257

Nigel
Supporter

Sprachen: Englisch (English ) Spanisch (Español )

Zeitzone: Europe/London (GMT+01:00)

You should be able to add the following style rule which you need to ensure is enqueued late so that it overrides the declared z-index:

.ui-datepicker.ui-widget-content {
    z-index: 100000 !important;
}

Such a high number is required to override the extremely high z-index for the header set by the theme.

#624261

Hi Nigel,
it didn't work.

i tried even a higher number with no success

.ui-datepicker.ui-widget-content {
    z-index: 9999999 !important;
}

any thoughts?

David

#624315

Nigel
Supporter

Sprachen: Englisch (English ) Spanisch (Español )

Zeitzone: Europe/London (GMT+01:00)

Screen Shot 2018-03-12 at 16.03.48.png

I don't know where you are trying to add it but it is not picked up by your page. See screenshot.

#624414

Hi Nigel,

i tried in a few locations
1. a custom css plugin for the site
2. the theme additional css option
the above didn't work.

the only place that it actually worked is in the toolset user form css option.
after updating the css there it worked however when i cheek the page using F12 i still see the z-index=1
not sure why.

Thanks for your help.

David

Dieses Ticket ist jetzt geschlossen. Wenn Sie ein Toolset Kunde sind und Hilfe benötigen, eröffnen Sie bitte ein neues Support-Ticket.