OpenCATS icon indicating copy to clipboard operation
OpenCATS copied to clipboard

Day/Month mixed up when editing activities if UK locale set

Open Mephisztoe opened this issue 7 years ago • 2 comments

Expected behavior and actual behavior.

When configured to use UK locale instead of US for datetime values (DD-MM-YYYY instead of MM-DD-YYYY), I expect an activities' month and day to be displayed correctly when editing an entry on a candidates' page. Instead they are mixed up.

Steps to reproduce the problem.

  • Set locale to UK
  • Log an activity on a candidates' page (date is e.g. August, 4th)
  • Click on edit button for activity

Result: The month Combo Shows up April, the day Combo 8th.

What version of opencats are you running? WAMP or LAMP?

XAMPP on Windows.

  • Operating System: | Windows NT ******** 6.2 build 9200 (Windows 8 Enterprise Edition) i586
  • Operating System Type: | CATS thinks your operating system is Windows.
  • PHP Version: | 5.6.28
  • Database Version: | MySQL 10.1.19-MariaDB

attach appropriate error logs. Please attach [apache/mysql] error/access logs as needed.

Mephisztoe avatar Dec 15 '17 13:12 Mephisztoe

Tested on demo page where is date format set to UK, event created at December 7th 2017 :

image

skrchnavy avatar Dec 16 '17 15:12 skrchnavy

Error probably caused in file: https://github.com/opencats/OpenCATS/blob/00166b4c3c83d0dcc9b7627411b144cb0d77758c/js/activity.js#L277

where is hardcoded format to 'MM-DD-YY'

skrchnavy avatar Dec 16 '17 15:12 skrchnavy