WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
94100
Calendar picker shows wrong date when input element has year earlier than 100
https://bugs.webkit.org/show_bug.cgi?id=94100
Summary
Calendar picker shows wrong date when input element has year earlier than 100
Keishi Hattori
Reported
2012-08-15 06:18:32 PDT
Date.UTC can't set an year earlier than 1900. So when the input has a value earlier than 1900, calendar picker shows the wrong date.
Attachments
Patch
(30.43 KB, patch)
2012-08-15 06:42 PDT
,
Keishi Hattori
no flags
Details
Formatted Diff
Diff
Patch
(30.41 KB, patch)
2012-08-15 19:05 PDT
,
Keishi Hattori
no flags
Details
Formatted Diff
Diff
Patch
(7.54 KB, patch)
2012-08-16 05:28 PDT
,
Keishi Hattori
no flags
Details
Formatted Diff
Diff
Patch
(6.83 KB, patch)
2012-08-17 05:05 PDT
,
Keishi Hattori
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Keishi Hattori
Comment 1
2012-08-15 06:42:03 PDT
Created
attachment 158561
[details]
Patch
Kent Tamura
Comment 2
2012-08-15 18:33:17 PDT
Comment on
attachment 158561
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=158561&action=review
> Source/WebCore/ChangeLog:8 > + Date.UTC can't set an year earlier than 1900. So when the input has a value earlier than 1900, calendar picker shows the wrong date.
Date.UTC() seems to work expectedly if year >= 100, not 1900.
Keishi Hattori
Comment 3
2012-08-15 19:05:16 PDT
Created
attachment 158688
[details]
Patch
Kent Tamura
Comment 4
2012-08-15 20:21:19 PDT
Comment on
attachment 158688
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=158688&action=review
> LayoutTests/ChangeLog:10 > + * platform/chromium-mac/fast/forms/date/calendar-picker-appearance-pre-100-expected.png: Added.
Adding a pixel test for this issue is not reasonable. Can we make this a dumpAsText test? I think the test code can access JavaScript code in a page popup.
> LayoutTests/fast/forms/date/calendar-picker-appearance-pre-100.html:16 > +console.log('Check if year before 1900 can be set.');
1900 -> 100
Keishi Hattori
Comment 5
2012-08-16 05:28:59 PDT
Created
attachment 158783
[details]
Patch
Kent Tamura
Comment 6
2012-08-16 06:36:57 PDT
Comment on
attachment 158783
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=158783&action=review
> LayoutTests/fast/forms/date/calendar-picker-appearance-pre-100-expected.txt:9 > +TEST COMPLETE > +PASS document.getElementById("date").value is "0002-02-03"
"TEST COMPLETE" followed by the PASS looks wrong. You need to use jsTestIsAsync=true & finishJSTest() if you use js-test-post.js, or need to remove js-test-post.js.
> LayoutTests/platform/chromium/TestExpectations:2494 > +BUGWK92710 : fast/forms/date/calendar-picker-appearance-pre-100.html = IMAGE PASS
We don't need it.
Keishi Hattori
Comment 7
2012-08-17 05:05:16 PDT
Created
attachment 159092
[details]
Patch
WebKit Review Bot
Comment 8
2012-08-17 19:52:03 PDT
Comment on
attachment 159092
[details]
Patch Clearing flags on attachment: 159092 Committed
r125962
: <
http://trac.webkit.org/changeset/125962
>
WebKit Review Bot
Comment 9
2012-08-17 19:52:07 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug