MigXdb manager table filter by date

Hello, I need to use MigXdb to display a table values, I understand the process and I did it many times, the question here is how can I include a filtering field with a calendar to display only the values from that date?
In the columbuttons tab inside MigX there is not options to include a custom field.

If you see the FormIt CMP that is technically exactly what I need, a bit simpler but that is perfect.

The question is where can I find information about how to create that?

Thanks!

you are looking for a datepicker above the grid, which works as filter?
would three listboxes for year month day work too?

There is an option that might work for you in the MIGX configuration under “Db-Filters”.

If you have a custom table with the column mydate, you can add a new filter like this:

  • filter Name: mydatefilter
  • Filter Type: date
  • getlist-where: {"mydate:[[+mydatefilter_dir]]":"[[+mydatefilter_date]]"}

migxdb_date_filter

The placeholder [[+mydatefilter_dir]] (filter name + _dir) refers to left side of the filter with the dropdown for all, =, <= and >=.
The placeholder [[+mydatefilter_date]] (filter name + _date) refers to right side of the filter, where you can choose a date.

The handling is a bit clunky. It only works if you select the date in the date picker. If you write the date by hand into the field, it won’t work.
Also with this exact solution, the = option only works, if the dates in your column mydate have the time 00:00:00 (e.g. 2024-09-20 00:00:00).

I think so it’s an option yes, but I think calendar will be better.
The question is how to implement it, I just need a guide, thanks Bruno!

Thanks mate, I’ll test it and let you know.
Cheers!