Message8325
Hi folks:
Thomas> If I set it to de_DE.UTF-8, then Firefox incorrectly shows mm / dd / yyyy
I set the language to Deutch from the firefox general settings menu and it displayed
correctly dd.mm.yyyy without a restart.
Thomas> javascript solution to showing date in normal format
That link overlays the date control with a reformatted span AFAICT. So
it would not allow editing the fields of the date. I came across something
similar in another thread that has a jsfiddle implementing it.
Also the extra maintenance burden of js is an issue.
Ralf> So maybe we can make this configurable as a global default
This can be done. It would have to display a text input for date and use the existing
broken popup calendar. I'm not sure how invasive it would be. I think the input code
has access to the config (self._client.db.config??). Maybe adding:
if config['TRACKER_EDIT_INTERNATIONAL_DATES']:
kwargs.setdefault("type", "text")
if popcal is not False:
popcal = True
# before existing
kwargs.setdefault("type", "date")
will work?
AFAIK there is no way to get yyyy-mm-dd formatting from the
date/datetime-local control without changing to a locale and
language that uses that format.
I'm also ok with reverting the whole date patch. I think the number/integer can still
stay though.
If this sounds good, can one of you implement it and add the config setting to the
update docs.
I'll reopen issue2551390 and reference these 4 messages. Also it sounds like we still
need to fix the calendar for Ralf's use case. Agreed?
One other nit as I was writing up the docs on that patch was the manual addition of the
javascript. Keeping the javascript out of the python code is a good thing, but it would
be good if we can either:
inject a reference to the file (via <script>)
insert the contents of the file (via readfile)
into the generated template exactly once. Not once for every date type field.
Adding it for every field is easy by putting the js into the string returned by
field()/field_date().
I'm glad we are finding this pre-release. So thanks for your help. |
|
Date |
User |
Action |
Args |
2025-01-24 13:15:01 | rouilj | set | messageid: <1737724501.36.0.192425048075.issue2550858@roundup-tracker.org> |
2025-01-24 13:15:01 | rouilj | set | recipients:
+ rouilj, schlatterbeck, ber, ThomasAH |
2025-01-24 13:15:01 | rouilj | link | issue2550858 messages |
2025-01-24 13:15:00 | rouilj | create | |
|