Date format for short and long ignored

Hi Thomas,
this is probably a little late, but as I just had the same issue, I am going to reply anyway:

The reason for this strange behaviour IMHO is the admin panel. Same as when you do it manually, the admin panel writes all configurations into the user/config/system.yaml file. So, when you manually edit the system.yaml and save something afterwards directly from the admin panel, it overwrites this file.
This must be combined with the fact, that the select options in the admin panel are based on what Grav calls “blueprints”. Stating from Grav’s documentation:

[Blueprints] are essentially the foundation of a theme or plugin’s interaction with the Grav admin. They tell Grav what a theme or plugin is, its name, where it can be found on GitHub, etc. It also generates the configuration options for that theme or plugin in the Grav admin.

These blueprints currently do not include the date format you are looking for. In fact, they do not show up in the select lists for default, long or short dates. Not even, if you enter them manually in the system.yaml.
But you can add them to the blueprint, so that they do show up and you can select them directly from the admin panel and therefore are not overwritten, when saving any configuration from the admin panel. You can do it like this:

Create a new file called system.yaml in the folder user/blueprints/config. You may need to create these folders; they are probably not there by default:

And then, add the following file content:

@extends:
    '@parent'
 
     form:
        fields:
            content:
                fields:
                    pages.dateformat.short:
                        options:
                            "d M Y": Date6
 
                    pages.dateformat.long:
                        options:
                            "d F Y, H:i": Date6

This adds another entry for the fields “Short display date format” and “Long display date format” at the end of the list, using the format that you specified.

Hope this (still?) helps. :slight_smile:
Sebastian