https://bugs.documentfoundation.org/show_bug.cgi?id=161361
Bug ID: 161361
Summary: Editing a User Field of type date has inconsistent
localization
Product: LibreOffice
Version: 24.2.0.2 rc
Hardware: x86-64 (AMD64)
OS: Linux (All)
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: Writer
Assignee: [email protected]
Reporter: [email protected]
Description:
I'm using LibreOffice 24.2.0.2.
In Writer, in a new document, do "Insert > Fields > More Fields" (or Ctrl+F2).
In the tab "Variables" select "User Field", provide a name, click on
"Additional formats".
Select language = French then select Date and pick any format (let's say
"JJ/MM/YY" which is french for "DD/MM/YY").
Provide a value (e.g. "10/05/2023") then click Apply and Insert. This inserts
the provided date and it's even possible to change it (e.g. "03/31/2023") and
click Apply. Click Close.
So far, everything work as expected.
Now double click on the field. You can edit it. Try setting it to "10/07/2023".
The value actually taken is "07/10/2023". This has the funny side-effect that
clicking on Apply multiple times keeps changing the date between July 10th and
October 7th.
Try setting it to "21/07/2023" (21st July 2023, remember this should be
DD/MM/YY). This fails.
Obviously this field expects a date with the format "MM/DD/YY" which is
inconsistent with the way the previous dialog was working and is also very
surprising for users.
The fact that many dates won't work and that there's no error when it fails to
parse the data makes it even more confusing.
Finally, from this same dialog (from double clicking on the date field),
changing the Format doesn't work.
Steps to Reproduce:
In Writer, in a new document, do "Insert > Fields > More Fields" (or Ctrl+F2).
In the tab "Variables" select "User Field", provide a name, click on
"Additional formats".
Select language = French then select Date and pick any format (let's say
"JJ/MM/YY" which is french for "DD/MM/YY").
Provide a value (e.g. "10/05/2023") then click Apply and Insert. This inserts
the provided date and it's even possible to change it (e.g. "03/31/2023") and
click Apply. Click Close.
So far, everything work as expected.
Now double click on the field. You can edit it. Try setting it to "10/07/2023".
The value actually taken is "07/10/2023". This has the funny side-effect that
clicking on Apply multiple times keeps changing the date between July 10th and
October 7th.
Try setting it to "21/07/2023" (21st July 2023, remember this should be
DD/MM/YY). This fails.
Obviously this field expects a date with the format "MM/DD/YY" which is
inconsistent with the way the previous dialog was working and is also very
surprising for users.
The fact that many dates won't work and that there's no error when it fails to
parse the data makes it even more confusing.
Finally, from this same dialog (from double clicking on the date field),
changing the Format doesn't work.
Actual Results:
Date is parsed as MM/DD/YYYY but displayed as DD/MM/YYYY.
Expected Results:
Date should be parsed the same way as it is displayed, ideally according to the
format chosen by the user.
Reproducible: Always
User Profile Reset: No
Additional Info:
N/A
--
You are receiving this mail because:
You are the assignee for the bug.