How to change date format in DJ-Classifieds custom fields

How to change date format in DJ-Classifieds custom fields

You can change the date format in extra fields in DJ-Classifieds.

Let’s add the custom field with a date.

For the sake of this tutorial, I’ll create the “Availability” custom field that will be used for showing the availability for the apartments.
Open DJ-Classifieds in back-end and click “Add field” and set:

image02 date format

  1. Label name
  2. Tooltip description if you want to use one
  3. Type (I chose “Date” but you could also use “Date from-to” if it better fits your purpose)
  4. Date format in PHP format (if nothing entered it’ll use the default Y-m-d format) - in this tutorial I’ve used the date format: F j, Y, g: I a

NOTE: You can set more settings than I did. Learn more about adding custom fields - How to add a new extra field in DJ-Classifieds

Click Save.
Once saved you can assign the extra field to the chosen category

image01 date format

Now the field was added to “Apartments” category.

Once adding the advert from front-end to this category, the date field will be displayed, and the user will be able to select the date from the regular calendar with an icon (1):

image00 date format

then select the date from the calendar (2), and the date will be displayed in the field (3).


      • Related Articles

      • How to order "fields" in DJ-Classifieds

        If you are wondering how to order "fields" in DJ-Classifieds component, follow this simple tutorial to learn everything! It's easy to make! Open the DJ-Classifieds component. Navigate to the "Fields" button and open it. Now navigate to the right, ...
      • Extra/Custom fields in DJ-Classifieds

        The DJ-Classifieds component allows assigning additional fields to the advert details from a certain category. Settings To create a custom field, click on the Extra Fields button from the Control Panel, then click New from the top right toolbar, and ...
      • Show ad's modification date in advert details

        You can display the date of a modification of an ad. It can be displayed in two places, below the date of publishing an ad. To display the date of modification go to Options>’ Advert details’ section of ’ Views ’ tab and in parameter ‘ show modified ...
      • How to change date format

        DJ-Classifieds uses the PHP date format. You can change the settings of the date format in options. The default date format is:  Y-m-d H:i:s (on the screenshot below, you can see how it looks like by default) - it means that the date displays in 24h ...
      • How to use DJ-Classifieds-Importer

        Important Note: We distribute the DJ-Classifieds-Importer component along with the active subscription of DJ-Classifieds. That means that if your subscription for DJ-Classifieds is active, you can download and use the DJ-Classifieds-Importer ...