When the commands next/previous for year & month are clicked, the datepicker popup is suddenly closed and apply the POST request for filter. It happens only in the filter of items lists.
The popup should not closed when we pass the next/previous month or year. It should close only when we click the day button.
The problem occurs only in the filters of items lists. If we use the datepicker in the edition of an item (calendar field), it works fine.
Joomla 4.2.4 and PHP 7.4.
Chrome/Firefox/Brave
Atum Default admin template (J4)
It seems the problem occurs in Joomla 3 and Joomla 4.
Labels |
Added:
No Code Attached Yet
|
Which component is this happening in? I cant remember core ever having a datepicker for a list filter.
It's Component Creator (https://www.component-creator.com). I left them an issue but they told me it's a Joomla Core field and not related to their components.
I don't have experience with Component Creator. However, base on what you describe here, I think it happens because somewhere in that field definition, you have onchange="this.form.submit();"
.
Then when you click on next/previous button, the value of the input changes, and the form is submitted.
I would say that this is expected behavior. So there is nothing for us to fix here. Somehow, you will have to find a workaround for this problem, for example remove onchange="this.form.submit();"
and use a separate button to submit the form.....
I don't have experience with Component Creator. However, base on what you describe here, I think it happens because somewhere in that field definition, you have
onchange="this.form.submit();"
.Then when you click on next/previous button, the value of the input changes, and the form is submitted.
I would say that this is expected behavior. So there is nothing for us to fix here. Somehow, you will have to find a workaround for this problem, for example remove
onchange="this.form.submit();"
and use a separate button to submit the form.....
Ah yes, I have checked the field definition and this is the problem.
Is there an hide/close event on the Joomla datepicker ?
I tried the bootstrap version :
$('#mydateinputid').datepicker() .on('hide', function(e) { document.adminForm.submit(); });
But it just changes the appearance of the datepicker and nothing else.
Is there an hide/close event on the Joomla datepicker ?
Honestly, I don't know. Maybe @dgrammatiko or @Fedik could give you the answer.
Simply put the datepicker is not designed to be used as a filter field in a list view.
I would recommend that you download the free version of dpcalendar and look at how they have done list view date filters
The calendar is NOT using Bootstrap for the popup. There is method for closing the popup
but I don't see any events other than the onChange for the input/value.
As @brianteeman said the calendar is not designed to work ootb with the search filters so maybe check dpcalendar
Closing because this is not a core issue. It's up to to developer to decide how to handle this development further.
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2022-12-09 08:30:46 |
Closed_By | ⇒ | joomdonation |
Which component is this happening in? I cant remember core ever having a datepicker for a list filter.