Closed
Bug 510355
Opened 15 years ago
Closed 15 years ago
Javascript function "getFullYear()" works not correct with "maxlength"
Categories
(Firefox :: General, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 437379
People
(Reporter: silvios_mail, Unassigned)
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; de; rv:1.9.0.13) Gecko/2009073022 Firefox/3.0.13
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; de; rv:1.9.0.13) Gecko/2009073022 Firefox/3.0.13
The Javascript function "getFullYear()" works not correct with "maxlength".
With javascript function "getFullYear()" can you write more characters in a input box as you have defined with "maxlength".
Maybe there are other functions with this behavior. I have not tested it.
Reproducible: Always
Steps to Reproduce:
For example my "false" HTML and Javascript code:
<input type="text" name="yearbox" size="2" maxlength="2">
<script type="text/javascript" language="javascript">
var now = new Date();
var year = now.getFullYear();
document.myform.yearbox.value=year;
</script>
If I use FF3, in the year box are 4 digits,
but I think there should be only 2 digits.
If I use FF2, there are only 2 digits.
Updated•15 years ago
|
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•