Using the Advanced Custom Fields Date Picker for Ordering Posts and Displaying the Date

How to use the date picker with Advanced Custom Fields to order your posts and show the date. With this example you can show the start date and if it’s a multiple day event, it will show the end date if you have one. It will also not show expired dates.

First, add two Custom Fields to your posts called, Start Date (start_date) and End Date (end_date).

Fill out a couple test posts. Some with just a start date and some with a start and end date.

Here’s the code: