-
Notifications
You must be signed in to change notification settings - Fork 184
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
Dates on Projects don't play nice with dd/mm/yyyy format #15
Comments
Yes, Django's date fields use the mm/dd/yyyy format. We have some placeholder text in the fields to act as a reminder and the datepickers should save you from needing to type them in manually in Django's format. At least for now, dates must be entered as mm/dd/yyyy. |
Ah cool, but the problem is that the mask you suggest is not accepted by the app. So I have to select 9th Feb in the data picker to get 2nd Sept in the system. The screenshots above are for the same value entered in the GUI and then displayed back at the user. |
I'm unable to reproduce this right now, but that seems weird. I wonder if it might be related to the locale of the system running Django. I will look into it. |
I've just had the same issue in the server checkout page, used the datepicker to choose 23rg August 2019 as the end date, it populated the field as 09/23/2019 and said the date was invalid when i tried to save. |
Can confirm this issue still exists. And have included an untested fix at the end of this post. OS: Windows 10 Pro Ghostwriter base.py timezone settings: UTC Using the date-picker, selecting 7 april 2020 and 9 april 2020 results in 4 july and 4 september, after saving the changes. Entering 07/04/2020 in the input box, ignoring the misleading date picker changes the date to 7 april, after saving the changes. Now I tried changing timezone settings in base.py to: Europe/Amsterdam. Also the locale folder in /app/locale is empty. I assume this folder should contain locale info for proper date and time settings? I have resolved the issue performing the following steps: The date-picker now properly works. I have yet to test further functions to see if this effects anything else. |
It looks like the above solution is at least one option for avoiding locale and timezone issues. Both
https://docs.djangoproject.com/en/3.0/ref/settings/#std:setting-USE_L10N There is a setting in base.py for locale paths, as specified here: https://docs.djangoproject.com/en/dev/ref/settings/#locale-paths Setting |
The date handler on the projects does not seem to like those that natively use ISO8601 type dates (yyyy/mm/dd or dd/mm/yyyy).
So when I try to add dates as per the displayed (mm/dd/yyyy) mask the system rejects the input.
To correct this I add a EU type date (dd/mm/yyyy) and the system accepts it and shows it as 9 Feb 2019 in the date picker window and then as 2nd Sept on the Project summary.
The text was updated successfully, but these errors were encountered: