Open Bug 1559759 Opened 5 years ago Updated 2 years ago

Date picker verification fails on dates after 12th of the month

Categories

(Core :: JavaScript: Standard Library, defect, P3)

67 Branch
defect

Tracking

()

Tracking Status
firefox-esr60 --- wontfix
firefox-esr68 --- affected
firefox68 --- wontfix
firefox69 --- fix-optional
firefox70 --- fix-optional

People

(Reporter: mozilla, Unassigned)

References

(Blocks 1 open bug, Regression)

Details

(4 keywords)

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0

Steps to reproduce:

View
https://www.cambridge-water.co.uk/household/moving-home/where-are-you-moving?directionOfMove=OutOftheArea
(select "Out of our area" if necessary).Date you're moving out
Scroll down to "Tell us about… The property you are moving out of"
Select the date box after "Date you're moving out"
Select a date after the 12th of any month (I chose 13 June 2019).

Actual results:

The date box is highlighted with a red border and the message:
"Please ensure you entered a valid date".

I have this problem with Firefox on Windows 7, Linux Ubuntu 1904 and Android 5.something.

Expected results:

Opera and Chromium accept 13 June 2019 and display "13/06/2019" in the date box with no highlighting or message.

Regression window:
https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=eeb73478d98476877f2035f0c330fdc89e361803&tochange=138521110469d3a80c58ae4571e7d0cf8e6de07c

Regressed by:
138521110469d3a80c58ae4571e7d0cf8e6de07c Morgan Phillips — Bug 1265136 - Modify Date.parse's handling of two digit years to improve cross-compatibility; r=Waldo

Status: UNCONFIRMED → NEW
Ever confirmed: true
Regressed by: 1265136

Hi Andrew,

I tried opening the url you provided (https://www.cambridge-water.co.uk/household/moving-home/where-are-you-moving?directionOfMove=OutOftheArea) using Firefox latest Nightly version on Ubuntu 18.04, Windows 10 and Windows 7 but I get an error message "Unable to connect"

Is there any other page you can provide so we can investigate this report?

Could you try testing if this issue is reproducible for you using the latest Nightly version? You can download it from here: https://nightly.mozilla.org/.

You can also test by creating a new profile, you have the steps here:https://support.mozilla.org/en-US/kb/profile-manager-create-and-remove-firefox-profiles?redirectlocale=en-US&redirectslug=Managing-profiles#w_starting-the-profile-manager

Thanks for your report.

Flags: needinfo?(mozilla)

Build ID 20190621093603
User Agent Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:69.0) Gecko/20100101 Firefox/69.0

I can still reproduced on Latest Nightly69.0a1 Windows10.

I can reproduce the problem with Nightly using a new profile.

I note that the problem page says:
Our website and MyAccount will be unavailable for some time on Saturday 22 June due to essential maintenance

  • so the bug may or may not be visible next week.

I get "Secure Connection Failed" with 67.0.3 and my standard profile; I believe that is because https://www.cambridge-water.co.uk/ uses only "weak" ciphers (as determined by https://www.ssllabs.com/ssltest/analyze.html?d=www.cambridge%2dwater.co.uk&latest ) but setting
security.ssl3.dhe_rsa_aes_256_sha = true, or several of the the other rsa ciphers, allows the site to show.

Flags: needinfo?(mozilla)

Hi Andrew,

I'm still unable to open the test page provided (https://www.cambridge-water.co.uk/household/moving-home/where-are-you-moving?directionOfMove=OutOftheArea and https://www.cambridge-water.co.uk/) using the latest Nightly version 70.0a1 (2019-07-09) .
I get error message "The server at www.cambridge-water.co.uk is taking too long to respond."

If there is other way I can access this page, please provide us with the steps or with an alternative page where we can reproduce the issue.

Thanks!

Flags: needinfo?(mozilla)

(In reply to Virginia Balducci from comment #5)

Hi Andrew,

I'm still unable to open the test page provided
(https://www.cambridge-water.co.uk/household/moving-home/where-are-you-
moving?directionOfMove=OutOftheArea and https://www.cambridge-water.co.uk/)
using the latest Nightly version 70.0a1 (2019-07-09) .
I get error message "The server at www.cambridge-water.co.uk is taking too
long to respond."

If there is other way I can access this page, please provide us with the
steps or with an alternative page where we can reproduce the issue.

Thanks!

Virginia Balducci, I have already provided archived html to reproduce the issue. Please use the archive.

STR

  1. Unzip attachment 9073236 [details] to local folder
  2. Open index.html
  3. Scroll to "Date you're moving out"
  4. Click the input field
  5. Select 13 in the date picker
Flags: needinfo?(virginia.balducci)

"Works for me".

For me both www.cambridge-water.co.uk and the archived .zip view and show the bug, with firefox 67.0.4 (64-bit, Ubuntu canonical 1.0)
and with Nightly 70.0a1 (2019-07-10) (64-bit).

Thanks for the achive Alice.

If internet topology matters I am in the UK and get

host www.cambridge-water.co.uk

www.cambridge-water.co.uk has address 213.253.7.174

host 213.253.7.174

Host 174.7.253.213.in-addr.arpa. not found: 3(NXDOMAIN)

(so the host has no reverse lookup).

Flags: needinfo?(mozilla)

Hi, Sorry for the confusion I hadn't noticed the zip file. I was able to reproduce the issue reported on the latest Nightly version 70.0a1 (2019-07-11) (64-bit).

I'll add Product/Component so the devs can take a look at it. If you consider this is not the right choice of components please feel free to change it.

Component: Untriaged → Layout: Form Controls
Flags: needinfo?(virginia.balducci)
Product: Firefox → Core

We have a regression range and an JS engine bug caused this.

It seems the page is doing bad UA sniffing.

jQuery.extend(jQuery.validator.methods,{date:function(n,t){var r=window.chrome,i;return r?(i=new Date,this.optional(t)||!/Invalid|NaN/.test(new Date(i.toLocaleDateString(n)))):this.optional(t)||!/Invalid|NaN/.test(new Date(n))}})

So if window.chrome is defined, then they do new Date(new Date().toLocaleDateString("18/07/2019")) which throws, and the validation "passes". Otherwise they do /Invalid|NaN/.test(new Date("18/07/2019")), which returns "Invalid Date" as Chrome and WebKit.

So the good thing is that you can work around this defining window.chrome = 1.

I'll ni? the people involved in that bug in case they have opinions about whether new Date("18/07/2019") should return invalid, and to the WebCompat team to see if they've seen something like this in the wild more often.

Component: Layout: Form Controls → JavaScript Engine
Flags: needinfo?(winter2718)
Flags: needinfo?(miket)
Flags: needinfo?(jwalden)

I asked the team, and they haven't seen anything like that before, but I did find the following result on GitHub:

https://github.com/HovisLtd/Hovis-Excellence/blob/c0fafe330ae88ec16233b60e3f188dd9c461f119/Hovis.Excellence.Web/Scripts/oldstuffjquery.validate.date.js#L29

It doesn't seem like a super common pattern -- I could only find this single match (but I also only searched for like 2 mins). But I guess that makes 2 instances.

Flags: needinfo?(miket)

Based on there only being 2 examples I'll mark this P2 and remove it from regression triage.
While there aren't a lot of examples it sounds like a valid bug.

Steven if you want the priority to be different please go ahead and change it. Thanks!

Flags: needinfo?(sdetar)
Priority: -- → P2

Priority looks fine to me for now

Flags: needinfo?(sdetar)
Blocks: 1274354
Component: JavaScript Engine → JavaScript: Standard Library
Has Regression Range: --- → yes

Redirect a needinfo that is pending on an inactive user to the triage owner.
:sdetar, since the bug has high priority and recent activity, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(winter2718) → needinfo?(sdetar)
Flags: needinfo?(sdetar)

Redirect a needinfo that is pending on an inactive user to the triage owner.
:sdetar, since the bug has high priority, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(jwalden) → needinfo?(sdetar)
Severity: normal → S4
Flags: needinfo?(sdetar)
Priority: P2 → P3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: