<html>
<head>
<base href="https://bugs.documentfoundation.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED NOTABUG - LibreOffice allows entry of wrong dates for format"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=144359#c5">Comment # 5</a>
on <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED NOTABUG - LibreOffice allows entry of wrong dates for format"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=144359">bug 144359</a>
from <span class="vcard"><a class="email" href="mailto:mikekaganski@hotmail.com" title="Mike Kaganski <mikekaganski@hotmail.com>"> <span class="fn">Mike Kaganski</span></a>
</span></b>
<pre>In other words:
You need to understand, that cell format is *not* intended to define "what
values a cell may contain"; it is *only* to define "what procedure to use when
show the *existing* content of the cell on screen/on paper".
I.e., when you type characters in a cell, the format string does *NOT* (and is
not designed to!) affect what you *may* enter into the cell (i.e., it is not a
filter). *Any* cell in a spreadsheet, however formatted, may contain any data -
it may be numeric, or textual; it may be a calculated formula returning text,
or number, or error.
The formatting of a cell does participate in conversion of your typed text to
the cell content. But its part is just to be a *hint* to the program what to
attempt, not a filter: i.e., a date format of the active cell might give a hint
in which order the date parts (year/month/day) might go in the input string.
But if the hint derived from the format does not match the input, the *correct*
behavior of the program is to fallback to the most reliable result: accept the
typed characters not as some converted number (which dates are), but as plain
text. There is *NO* "invalid" text: just anything that you may type is a valid
text string, and must be accepted as a valid cell content.
What you are talking about is *validation* of input; and as Uwe and I informed
you, there is a dedicated tool for *validation*. What you suggest is using a
wrong tool for the task: you try to use cell format for the validation task,
for which there is Validity.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>