No Code Attached Yet
avatar spinoops
spinoops
6 Dec 2022

Steps to reproduce the issue

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.

date-arrows

Expected result

The popup should not closed when we pass the next/previous month or year. It should close only when we click the day button.

Actual result

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.

System information (as much as possible)

Joomla 4.2.4 and PHP 7.4.
Chrome/Firefox/Brave
Atum Default admin template (J4)

Additional comments

It seems the problem occurs in Joomla 3 and Joomla 4.

avatar spinoops spinoops - open - 6 Dec 2022
avatar joomla-cms-bot joomla-cms-bot - change - 6 Dec 2022
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 6 Dec 2022
avatar spinoops spinoops - change - 6 Dec 2022
The description was changed
avatar spinoops spinoops - edited - 6 Dec 2022
avatar brianteeman
brianteeman - comment - 6 Dec 2022

Which component is this happening in? I cant remember core ever having a datepicker for a list filter.

avatar spinoops
spinoops - comment - 7 Dec 2022

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.

avatar joomdonation
joomdonation - comment - 7 Dec 2022

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.....

avatar spinoops
spinoops - comment - 7 Dec 2022

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.

avatar joomdonation
joomdonation - comment - 7 Dec 2022

Is there an hide/close event on the Joomla datepicker ?

Honestly, I don't know. Maybe @dgrammatiko or @Fedik could give you the answer.

avatar brianteeman
brianteeman - comment - 7 Dec 2022

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

avatar dgrammatiko
dgrammatiko - comment - 7 Dec 2022

The calendar is NOT using Bootstrap for the popup. There is method for closing the popup

JoomlaCalendar.prototype.hide = function () {

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

avatar joomdonation joomdonation - close - 9 Dec 2022
avatar joomdonation
joomdonation - comment - 9 Dec 2022

Closing because this is not a core issue. It's up to to developer to decide how to handle this development further.

avatar joomdonation joomdonation - change - 9 Dec 2022
Status New Closed
Closed_Date 0000-00-00 00:00:00 2022-12-09 08:30:46
Closed_By joomdonation

Add a Comment

Login with GitHub to post a comment