• Hi Michael,

    Before asking for any support I wanted to thank you for your efforts you put in creating this plugin. It’s by far the most useful plugin I came across so far!

    If you get a chance, could you please help me get a date range filter working? What I’m trying to do is grab values entered from two input fields: Start Date and End Date and then insert them into submit_time filter. This is what I have so far, but it’s not grabbing the values the same it does for other columns:

    Start Date: <input name="start" type="text"/>
    End Date: <input name="end" type="text"/>
    
    [cfdb-datatable form="Schedule Tracker" filter="submit_time>~~/.*$_POST(start).*/i&&submit_time<~~/.*$_POST(end).*/i"]

    I really appreciate if you could help me with this.

    Thanks,
    Emir

    • This topic was modified 7 years, 9 months ago by emir94. Reason: change of title
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Michael Simpson

    (@msimpson)

    See if this works:

    [cfdb-datatable form="Schedule Tracker" filter="submit_time>=$_POST(start)&&submit_time<=$_POST(end)"]

    Thread Starter emir94

    (@emir94)

    That worked perfectly. Thank you so much! It works with type="date", which is even better (in case somebody’s wondering how to implement a date picker range)

    Thanks Michael,
    Emir

    Hi Michael. I tried the shortcode you have given and the entire shortcode just show up when i do a page preview. It does not show the result of the filter after i input in the start and end inputs.

    I have been trying to do a date search form base on 2 users inputs (Start and End), hopefully you could help.

    Many thanks.

    William

    Below is my code

    <form action=”” method=”POST”>
    Start Date: <input name=”start” type=”text”/>
    End Date: <input name=”end” type=”text”/>
    <input type=”submit” />
    </form>

    [cfdb-datatable form=”Add-Asset-desktop-Form” filter=”submit_time>=$_POST(start)&&submit_time<=$_POST(end)”]

    • This reply was modified 7 years, 6 months ago by williampck.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Date range filter for data – CFDB’ is closed to new replies.