filter out past dates

  • I have a list of dates on a page and I want to filter out all past dates so that only future dates will show.


    I have the following code but cannot see why it doesn't work.

  • This is the full template

    Code
    1. <div class="form-check">
    2. <input
    3. class="form-check-input" style="text-align: left !important; font-weight: 100 !important"
    4. type="radio"
    5. name="flexRadioDefault1"
    6. id="flexRadioDefault1" value="<perch:content id="appttime" type="date" time label="Date/Time" format="d F Y H:i" native>"
    7. />
    8. <label class="form-check-label" for="flexRadioDefault1">
    9. <perch:content id="appttime" type="date" time label="Date/Time" format="d F Y H:i" native></div>
  • I think when the date is stored it's set in the standard format of 'Y-m-d H:i:s'. The formatting of field happens during runtime in the template handler, instead of the save/edit process.


    If that still doesn't work you can check the database, or use the <perch:showall/> to see the unformatted value