Skip to content

Calendar events date format does not match the date format set on the wiki #44

@lucaa

Description

@lucaa

For example, on a standard wiki with no modifications, we have this behaviour:
the dates displayed on standard UI elements of a page are displayed in format yyyy/MM/dd HH:mm

image

while the dates displayed for events of the calendar application use a dd.MM.yyyy HH:mm format:

image

Now, this may not be simple at all to fix in a generic way (making sure that the date format of the events always follows the format configured in the wiki administration for the whole wiki), since the date format of the property is something stored in the Date property in the class, so we may need a new feature of the date properties for that.

However, there could be 2 paths for getting a better result specifically for the calendar application:

  • having a different default in the calendar application class, that corresponds to the default of the wiki, when no specific configuration is made on the wiki (my test is on a 12.6.4, I'm not sure whether it changed with XWiki versions or not). This way, at least there is one usecase where the 2 would be coherent :)
  • having a custom handling (custom displayer) for those properties, for the view mode, that would ignore the format specified in the class and would use the format set in the wiki administration. However, if this is the solution chosen, we'd need to do this carefully: it's possible that, in the administration, a custom configuration would remove the time (hours and minutes) from the wiki date format, because that level of precision is not considered necessary. In that case, the display of calendar events should append hours and minutes on top of the date format set in administration. Also, if we choose this second solution, we need to make sure it doesn't impact edit mode and think of all usecases (livetables, etc) where the actual date format of the class may surface, and try to handle it, so that we don't have incoherent display of that information.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions