Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: Select a Table from Range Dates [SOLVED] (Read 2371 times) previous topic - next topic

Select a Table from Range Dates [SOLVED]

Hello, I need do a filter with  dates in a table,   which component would i use?

I cannot find how to pass the parameters   Start Day / End Day

Can someone give me some light about this?

Thanks you in advance

Osvaldo

Re: Select a Table from Range Dates

Reply #1
Hello, I need do a filter with  dates in a table,   which component would i use?

I cannot find how to pass the parameters   Start Day / End Day

Can someone give me some light about this?

Thanks you in advance

Osvaldo


Use the DateField and set DateMode to Range.

Re: Select a Table from Range Dates

Reply #2
@barakak thank you that work fine, i have spanish standard date as dd-mm-yy  or d-m-Y, can you help me with how can i check the date filter with phpdatetime format?   The filter ever return empty, i have data.

Re: Select a Table from Range Dates

Reply #3
@barakak thank you that work fine, i have spanish standard date as dd-mm-yy  or d-m-Y, can you help me with how can i check the date filter with phpdatetime format?   The filter ever return empty, i have data.

There's a date format property for the date, try that

Re: Select a Table from Range Dates Not Solved Yet

Reply #4
Hello Again,   Date filter in range mode not work.   Single day works, multiple days works, both work fine
but range between days put on 1st January of 1970 and gives an error too

Attached are the screens

I dont know what can i do.

thanks in advance

 

Re: Select a Table from Range Dates [SOLVED]

Reply #5
The error is on the controller when u add range by date  Need check the source in controller folder

when u use english the filter is  TO
   }
      if(!empty($request->ausentismos_fecha)){
         $vals = explode("to", str_replace(" ", "", $request->ausentismos_fecha));
         $startdate = $vals[0];
         $enddate = $vals[1];
         $db->where("ausentismos.fecha BETWEEN '$startdate' AND '$enddate'");
      }


when u use spanish the filter is  a

   }
      if(!empty($request->ausentismos_fecha)){
         $vals = explode("a", str_replace(" ", "", $request->ausentismos_fecha));
         $startdate = $vals[0];
         $enddate = $vals[1];
         $db->where("ausentismos.fecha BETWEEN '$startdate' AND '$enddate'");
      }

I think in other languages need put the correct word to replace "to"