Bug 150587 - Date control. It is not possible set "Date min" property a value lower than 1/1/1600 or "Date max" greater than 1/1/9999
Summary: Date control. It is not possible set "Date min" property a value lower than 1...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
3.3 all versions
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 150588 (view as bug list)
Depends on:
Blocks: Fields
  Show dependency treegraph
 
Reported: 2022-08-24 21:59 UTC by jcsanz
Modified: 2023-07-20 21:15 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Test writer document with a data field control (10.49 KB, application/vnd.oasis.opendocument.text)
2022-08-25 10:40 UTC, jcsanz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jcsanz 2022-08-24 21:59:17 UTC
Description:
In a Date control, in design mode, if try to set "Date min" property to a value lower than 1/1/1800 it changes to 1/1/1600 without any warning. Also is is not possible to delete "Date min" value.
So, in production, the mínimum date that is possible to introduce in a date control is 1/1/1600.


Steps to Reproduce:
1. Create a writer document (or a Base form, or a Basic form, or may be in Calc or Impress)
2. Insert a Date field control
3. In design mode, set "Date min" property value lower than 1/1/1600
4. Lost focus on "Date min" property, the value is changed to 1/1/1600 without any warning
5. Close design mode
6. Introduce a date lower than 1/1/1600 and push Enter, the date is changed to 1/1/1600

Actual Results:
* Not possible to set a lower than 1/1/1600 "Date min" property value
* Not possible to introduce a value lower than 1/1/1600 in a date field control

Expected Results:
* Set any "Date min" property value, also no value (no limit) or at least from "1/1/0001" to "31/12/9999" which is the range in most of databases
* Introduce any date in the control


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.4.0.3 (x64) / LibreOffice Community
Build ID: f85e47c08ddd19c015c0114a68350214f7066f5a
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: es-ES
Calc: CL
Comment 1 Eike Rathke 2022-08-24 22:36:24 UTC
*** Bug 150588 has been marked as a duplicate of this bug. ***
Comment 2 Eike Rathke 2022-08-24 22:38:45 UTC
Bug 150588 is almost the same just with max instead of min.
("if try to set "Date max" property to a value greater than 1/1/9999 it changes to 1/1/9999 without any warning. Also is is not possible to delete "Date max" value.
So, in production, the maximum date that is possible to introduce in a date control is 1/1/9999.
")
Comment 3 jcsanz 2022-08-24 22:48:12 UTC
(In reply to Eike Rathke from comment #2)
> Bug 150588 is almost the same just with max instead of min.
Yes, that is true, but I've been said "if something different, different bug"
Comment 4 jcsanz 2022-08-25 10:40:19 UTC
Created attachment 182012 [details]
Test writer document with a data field control
Comment 5 gmolleda 2022-08-25 17:06:11 UTC
Confirmed:
LibreOffice 3.3.0 
OOO330m19 (Build:6)
tag libreoffice-3.3.0.4
Comment 6 jcsanz 2022-08-25 21:00:27 UTC
I have sent a patch set https://gerrit.libreoffice.org/c/core/+/138845 to discuss.

Changes in the patch, solve the problem of view data in a date field control in most databases, which usually their date range goes from 1/1/0001 to 31/12/9999, but still maintains limits on the range of dates that can be viewed.
 
A solution that removes all limits would be better, but I am not able to implement it without help.

In any case, the patch extends the range of supported dates to dates before 1/1/1600, which in my opinion is too limiting date, and on the other side it extends the range so that it allows to enter the "magic" date 9/9/9999 which is widely used by database users as the "end of the world" date (the forever date in ranges from-to).

This patch could solve too tdf#150587 extending the limits of "Date min" and "Date max" to more reasonable limits
Comment 7 pablogzlezm 2022-08-29 00:33:49 UTC
Confirmed with "Date min" and "Date max".
LibreOffice 7.4.0.3
OS: Linux 5.19 (release supplied by Arch Linux); UI render: default; VCL: gtk3
Locale: es-VE (es_VE.UTF-8); UI: es-ES
Comment 8 Stéphane Guillou (stragu) 2022-08-31 10:22:42 UTC
Also confirmed with:

Version: 7.4.0.3 / LibreOffice Community
Build ID: f85e47c08ddd19c015c0114a68350214f7066f5a
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded