Add current week and last week in search/filter date ranges

Collapse
X
 
  • Time
  • Show
Clear All
new posts

  • gribs
    replied
    Yes it is. It shows me some results but wrong dateinterval

    Leave a comment:


  • yuri
    replied
    I don't know. Is your code executed when you run search? Did you check?

    Leave a comment:


  • gribs
    replied
    No error, just doesn't work, it shows me results of the first week of the last month I think

    Leave a comment:


  • yuri
    replied
    What result? Some error?

    Leave a comment:


  • gribs
    replied
    Hi, thanks but I already tried, with this in Base.php (+ reference added in date.js and datetime js views)

    "case 'currentWeek':
    $dt = new \DateTime();
    $part['AND'] = array(
    $item['field'] . '>=' => $dt->modify('first day of this week')->format('Y-m-d'),
    $item['field'] . '<' => $dt->add(new \DateInterval('P1W'))->format('Y-m-d'),
    );
    break;"

    I also tried "P7D"

    Leave a comment:


  • yuri
    replied
    Hi

    Search in files by contents. Search by 'currentMonth' phrase. And you will find places where you can add new predefined ranges.

    Leave a comment:


  • Add current week and last week in search/filter date ranges

    Hi,

    Currently, there are many date range filters (current year / month, last month, today, between...).

    But can you help me to add last week and current week filters in date range please?

    In fact, I use currently between filter so, but with the new feature sending automatically grid reports, it is no more relevant

    thank you for your consideration
Working...