Here, in a date field, we have column filter with calendar search design which is working fine.
With above calendar search we need only year search too, is it possible?
After typing 2015 in date column filter we can fetch all 2015 dates
Option1: Use dbname property to change where clause field name. e.g. if field is: invdate
$col[“dbname”] = “date_format(invdate,’%Y’)”;
Drawback is you can’t use exact date/month search in it. Only year search.
Option2: Use contains search on date field. Pasting from docs:
By default, datepicker does not perform ‘contains’ search. If you wish to enable, you need to set following with date column. This will disable datepicker.
// contains search
$col[“searchoptions”][“sopt”] = array(“cn”);
Abu Ghufran - Dev Team
Grid 4 PHP Framework
We are sorry that this post was not useful for you!
Let us improve this post!
Tell us how we can improve this post?