ListerNativeDateFormat by Robin S

Allows the date format for "created", "modified" and "published" columns to be set within a Lister.

Lister Native Date Format

Allows the date format for "created", "modified" and "published" columns to be set within a Lister or Lister Pro instance.

Lister Native Date Format

Why?


Lister formats the "created", "modified" and "published" columns as relative time strings and doesn't provide an easy way to change this without writing code. Sometimes a value like "3 weeks ago" is not precise enough and you want to see an exact date/time in these columns, perhaps only temporarily before switching back to a relative date.

Details


An icon is added near the top right of the Lister that reveals a dropdown where you can select from a list date formats that you define in the module config.

The Lister will remember your chosen date format the next time you visit the Lister. If you have Lister Pro installed then each Lister Pro instance will remember the date format previously set for that instance.

Configuration


In the "Date options" field in the module config, enter a list of date formats that are compatible with wireDate(), one format per line.

The default date format used by Lister is "rel".

Date options

You can also set a default date format for native fields which will apply to all Listers that haven't yet had a date format chosen from the dropdown.

Install and use modules at your own risk. Always have a site and database backup before installing new modules.

Latest news

  • ProcessWire Weekly #520
    In the 520th issue of ProcessWire Weekly we'll check out some of the latest additions to the ProcessWire module's directory, share some highlights from the latest weekly update from Ryan, and more. Read on!
    Weekly.pw / 27 April 2024
  • ProFields Table Field with Actions support
    This week we have some updates for the ProFields table field (FieldtypeTable). These updates are primarily focused on adding new tools for the editor to facilitate input and management of content in a table field.
    Blog / 12 April 2024
  • Subscribe to weekly ProcessWire news

“We were really happy to build our new portfolio website on ProcessWire! We wanted something that gave us plenty of control on the back-end, without any bloat on the front end - just a nice, easy to access API for all our content that left us free to design and build however we liked.” —Castus, web design agency in Sheffield, UK