Hello everyone, I just used a krajee datetime picker to easily get the time when I search it through gridView but why it doesn’t not show any results, I didn’t edit anything at the TicketSearch.php model. I’ve used TIMESTAMP in the time_start
Does your filter work as expected with the datetime picker restored to a default plain text input?
You say that “time_start” is TIMESTAMP. And in gii-generated “search” method, the filtering is implemented using exact comparison by default. I guess it’s very difficult to get a matching record.
I tried the default plain text and it works fine. I don’t why when I use the widget it doesn’t work.
EDIT:
I get it now, it doesn’t work using widget because I need to input the exact ‘time_start’ like in the plain text. For example if the ‘time_start’ is 2017-10-17 05:32:03 then I need to type the whole time_start which is 2017-10-17 05:32:03 but in the datetime widget I need to select the exact time_start which also includes the seconds
If I were an end user of your app, I would not want to use a filter that would require me to input (or select) the exact date time. Just a date without time would be enough, wouldn’t it?
Or, I would rather like to filter the records by a range of date: “date_from” and “date_to”.