silentsokolov / django-admin-rangefilter

A Django app that lets you filter data by date range and numeric range in the admin UI
MIT License
721 stars 106 forks source link

Scrolling Admin Filter with Django CMS #56

Closed HenryMehta closed 3 years ago

HenryMehta commented 3 years ago

When installed with Django-CMS so you have the Django CMS admin, if the number of filters requires a scroll to fit all the filters then the calendar and today buttons remain in their absolute position but everything else scrolls

silentsokolov commented 3 years ago

django-admin-rangefilter doesn't support Django-CMS. But if you give a screenshot and more info, I could help you

HenryMehta commented 3 years ago

My solution was to add a css file to the form

    class Media:
        css = {'all': ('lead_management/css/rangefilter.css',)}

With this css

.admindatefilter .datetimeshortcuts {
    position: relative !important;
    display: inline-flex;
}
.admindatefilter a {
    position: relative !important;
}

form input.vDateField {
    min-width: calc(100%) !important;
}

This changes the display so the input goes full width then the two button below the input rather than 3 in a row. And now it all scrolls.