Calendar widget does not display in front of modals

Bug #1364649 reported by Justin Pomeroy
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Expired
Medium
Unassigned

Bug Description

When the calendar widget is used on a field that is displayed in a modal, the widget displays behind the modal so you can't see it. None of the fields that use a calendar widget is currently displayed on a modal so this has not been an issue. I encountered the problem when extending horizon with a custom panel that uses a modal with a calendar widget on it.

To recreate, the datepicker must be initialized on modal init, and a date field needs to be added to a modal form. For example I added the following fields to the Admin -> Create Network form. The datepicker init code keys off the start and end field IDs so it's easiest to just use those names.

    start = forms.DateField(label=_("Start date"), required=False,
                                 input_formats=("%Y-%m-%d",),
                                 widget=forms.DateInput(attrs={
                                     'data-date-format': 'yyyy-mm-dd'}))
    end = forms.DateField(label=_("End date"), required=True,
                          input_formats=("%Y-%m-%d",),
                               widget=forms.DateInput(attrs={
                                   'data-date-format': 'yyyy-mm-dd'}))

Initialize the datepicker on modal init somewhere in the javascript:

    horizon.modals.addModalInitFunction(horizon.forms.datepicker);

When you open the Create Network form and click in the Start date or End date fields you can see the calendar partly showing underneath the modal.

Justin Pomeroy (jpomero)
Changed in horizon:
assignee: nobody → Justin Pomeroy (jpomero)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

Fix proposed to branch: master
Review: https://review.openstack.org/118760

Changed in horizon:
status: New → In Progress
Changed in horizon:
assignee: Justin Pomeroy (jpomero) → David Lyle (david-lyle)
Revision history for this message
David Lyle (david-lyle) wrote :

The place you actually see this is on the Resource Usage panel in the admin dashboard. The date-picker is not behind the modal, it's not even on the page.

Changed in horizon:
assignee: David Lyle (david-lyle) → nobody
David Lyle (david-lyle)
Changed in horizon:
importance: Undecided → Medium
utsav dusad (utsavdusad)
Changed in horizon:
assignee: nobody → utsav dusad (utsavdusad)
Revision history for this message
Rob Cresswell (robcresswell-deactivatedaccount) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on horizon (master)

Change abandoned by Justin Pomeroy (<email address hidden>) on branch: master
Review: https://review.openstack.org/118760

Revision history for this message
Rob Cresswell (robcresswell-deactivatedaccount) wrote :

Patch was abandoned, but I believe this was fixed elsewhere; moving to incomplete for now.

tags: removed: bootstrap
Changed in horizon:
status: In Progress → Incomplete
assignee: utsav dusad (utsavdusad) → nobody
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for OpenStack Dashboard (Horizon) because there has been no activity for 60 days.]

Changed in horizon:
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.