Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

lucaa opened this issue Nov 18, 2020 · 0 comments · Fixed by #65

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

lucaa opened this issue Nov 18, 2020 · 0 comments · Fixed by #65


Copy link

lucaa commented Nov 18, 2020

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


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


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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

Successfully merging a pull request may close this issue.

3 participants