The first thing that you’re going to need to do is alter the format date, of get the date without formatting so that it’s in a format that can be sorted. This will depend on if you’re using ACF 4 or 5. In 4 you set the storage format, in 5 the storage format is always ‘YYYYMMDD’ which makes it sortable. You can get an un-formatted field value by including a 3rd argument when calling
Getting a value without formatting is covered on this page http://www.advancedcustomfields.com/resources/get_field/
and sorting the rows of a repeater is covered here http://www.advancedcustomfields.com/resources/how-to-sorting-a-repeater-field/
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
© 2023 Advanced Custom Fields.