No Code Attached Yet
avatar fillera
fillera
2 May 2026

What happened?

If a calendar selector is used as filter in a form filter (forms/filter_items.xml, e.g.) and a date is selected, when you press the filter clear button the calendar selector does not clear its content and the filter bar is not hidden at all.

Version

6.1.0

Expected result

The selected date might be deleted and all the filter bar would be hidden.

Actual result

The selected date is not removed and all the filter bar is shown.

Suggested solution

The input type="text" of the calendar selector has a data attribute (data-alt-value) which is not be cleared in the method 'clear' (line 245) of searchtools.js

If that data attribute is not clear, the calendar submit the previous selected date and when the view is loaded again, the calendar shows a value and the filter bar is not hidden.

So, clear method in searchtools.js must remove this data attribute after deleting the input value:

i.dataset.altValue = '';

An example of form filter is included to replicate the issue:

<?xml version="1.0" encoding="UTF-8"?>
<form>
<fields name="filter">
<field
name="search"
type="text"
inputmode="search"
label="LABEL"
description="DESCRIPTION"
hint="JSEARCH_FILTER"
/>
<field
name="begin"
type="calendar"
format="%d-%m-%Y"
filter="user_utc"
translateformat="true"
/>
</fields>
<fields name="list">
<field
name="fullordering"
type="list"
label="JGLOBAL_SORT_BY"
statuses="*,0,1,2,-2"
class="js-select-submit-on-change"
default="a.id ASC"
validate="options"
>
<option value="">JGLOBAL_SORT_BY</option>
<option value="a.id ASC">JGRID_HEADING_ID_ASC</option>
<option value="a.id DESC">JGRID_HEADING_ID_DESC</option>
</field>

    &#60;field
        name="limit"
        type="limitbox"
        label="JGLOBAL_LIST_LIMIT"
        default="25"
        class="js-select-submit-on-change"
    /&#62;
&#60;/fields&#62;

</form>

avatar fillera fillera - open - 2 May 2026
avatar fillera fillera - change - 2 May 2026
Labels Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 2 May 2026
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 2 May 2026
avatar BeginnerJoomlaCom
BeginnerJoomlaCom - comment - 2 May 2026

An example of form filter is attached to recreate the issue.

Nothing is attached.

avatar fillera
fillera - comment - 2 May 2026

An example to recreate the issue:

JGLOBAL_SORT_BY JGRID_HEADING_ID_ASC JGRID_HEADING_ID_DESC
    <field
        name="limit"
        type="limitbox"
        label="JGLOBAL_LIST_LIMIT"
        default="25"
        class="js-select-submit-on-change"
    />
</fields>

This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47723.
avatar fillera
fillera - comment - 2 May 2026

An example to recreate the issue:

JGLOBAL_SORT_BY JGRID_HEADING_ID_ASC JGRID_HEADING_ID_DESC
    <field
        name="limit"
        type="limitbox"
        label="JGLOBAL_LIST_LIMIT"
        default="25"
        class="js-select-submit-on-change"
    />
</fields>

This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47723.
avatar fillera
fillera - comment - 2 May 2026

An example of form filter is attached to recreate the issue.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47723.

avatar fillera
fillera - comment - 2 May 2026

An example of form filter is attached to recreate the issue.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47723.

avatar fillera
fillera - comment - 2 May 2026

Example


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47723.

avatar fillera
fillera - comment - 2 May 2026

Example


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47723.

avatar fillera
fillera - comment - 2 May 2026

Example


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47723.

avatar fillera
fillera - comment - 2 May 2026

Example


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47723.

avatar fillera
fillera - comment - 2 May 2026

An example of form filter to replicate this issue:

...xml

JGLOBAL_SORT_BY JGRID_HEADING_ID_ASC JGRID_HEADING_ID_DESC
    <field
        name="limit"
        type="limitbox"
        label="JGLOBAL_LIST_LIMIT"
        default="25"
        class="js-select-submit-on-change"
    />
</fields>
...
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47723.
avatar fillera
fillera - comment - 2 May 2026

An example of form filter to replicate this issue:

...xml

JGLOBAL_SORT_BY JGRID_HEADING_ID_ASC JGRID_HEADING_ID_DESC
    <field
        name="limit"
        type="limitbox"
        label="JGLOBAL_LIST_LIMIT"
        default="25"
        class="js-select-submit-on-change"
    />
</fields>
...
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47723.
avatar fillera fillera - change - 2 May 2026
The description was changed
avatar fillera fillera - edited - 2 May 2026
avatar fillera fillera - change - 2 May 2026
The description was changed
avatar fillera fillera - edited - 2 May 2026
avatar fillera fillera - change - 2 May 2026
The description was changed
avatar fillera fillera - edited - 2 May 2026
avatar brianteeman
brianteeman - comment - 2 May 2026

There is already an open issue for this with an accompanying pull requests containing a fix for testing.see #47686

Add a Comment

Login with GitHub to post a comment