Min/Max exposed filter displays when AJAX is selected

Created on 18 February 2025, about 2 months ago

Problem/Motivation

We are using the calendar to display events using the event content type. From the initial display all seems fine. I expected to click through each month to display the events. However, I realize I am able to only view 4-5 months of events. At this point I do not have the AJAX setting in the view enabled .

If I enable AJAX, then all of my events are displayed, but it also displays an unwanted exposed Min/Max filter. I can hide the exposed filter using CSS and everything seems to display. Not ideal, but a workaround at the moment.

form.views-exposed-form{
display:none;
}

I was hoping it would just display all of the events without the Minimum or Maximum date exposed filter.

Any suggestions or thoughts would be greatly appreciated.

My current setup (We just had a module update push 2/13)

  • Drupal 10.4.1
  • SmartDate 4.2.1 (we do not use the recurring submodule)
  • PHP 8.3.15
  • FullCalendar 3.0.2

Steps to reproduce

AJAX NOT enabled

  1. In the format section of the view Display, select FullCalendar.
  2. Make sure you add the appropriate field (title,date, link fields) to avoid getting errors.
  3. Continue configuring your view selecting the proper filter criteria.
  4. Test the calendar. I was only able to view on the first 4-6 months of events. I verified I had added event for the entire year.

Second test AJAX Enabled.
Under the Advanced toggle, make sure Use AJAX is enabled.

Proposed resolution

Would like all of event are displayed regardless of whether AJAX is enabled or not.

πŸ› Bug report
Status

Active

Version

3.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States dlfaison

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @dlfaison
  • πŸ‡ΊπŸ‡ΈUnited States dlfaison
  • πŸ‡ΊπŸ‡ΈUnited States erutan

    I tend to not use Ajax unless I have a good reason to - it's odd in this case as the module is loading the javascript library for fullcalendar anyway.

    On a local or dev server try disabling all other contrib modules and then try with/without Ajax? There's often some weird ajax errors when there's a lot of views centric contrib enabled. If that solves the problem, start enabling them until you find the problem one.

  • πŸ‡ΊπŸ‡ΈUnited States erutan

    You could try switching between BEF & default exposed filters https://www.drupal.org/project/better_exposed_filters β†’ and see if there's any change.

  • πŸ‡ΊπŸ‡ΈUnited States dlfaison

    Apologizes for late response.

    Exposed form style set to BEF with AJAX off, the min/max field do NOT appear
    Exposed form style set to BEF with AJAX on, the min/max field does appear

    Exposed form style set to Default with AJAX on, the min/max field does appear
    Exposed form style set to Default with AJAX off, the min/max field does NOT appear

    My main concern was not all events were being displayed when AJAX was off. In testing when AJAX was turned on additional events were displayed. I had no reason for this happening. One of the sites we manage have alot of events, so I was thinking it had to with number of events that are attempting to be rendered.

    I have taxonomy terms associated with the calendar view. By default it would display all of the events twice. To removed the duplicates, I checked the reduced duplicates checkbox and that resolved the issue.

    So at this point, with AJAX on or off, all of the events appear to be displaying which is good. I try to avoid using AJAX whenever possible.

    You can close ticket at this point.

    Separately, do you guys have a slack channel as well to ask questions??

    I wanted to take advantage of some of the other Setting configurations and wanted to get some insight on the following items.

    - Customize Fields toggle - While I can set the configuration, I cant do not see any noticeable changes.
    - Date Navigation toggle - I tried setting a valid date range and nothing seems to work. hard coding a start and end date nor using a relative date range yields any results.

    Clicking the more information link seems to say I need to imply I need to add some code to the module or is this a premium feature..

    Thanks for the module. It has been a life-saver for our team.

  • πŸ‡ΊπŸ‡ΈUnited States erutan

    I'm not a maintainer, unsure if there's a slack channel but I don't think so, nothing showed up in a quick search on drupal slack.

    The more information page should send you to the docs for fullcalendar (the actual javascript library), basically the values input into settings just get sent to that. If those two options aren't doing what they should be doing, you could check to see if they're wired up correctly in the module and/or create new issues. Mandclu who created the most recent version of this module seems to be busy at the moment.

Production build 0.71.5 2024