Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebUI: Fix misinterpretation of the date picker #4184 #4186

Conversation

dchristidis
Copy link
Contributor

No description provided.

@dchristidis dchristidis linked an issue Dec 7, 2020 that may be closed by this pull request
mlassnig
mlassnig previously approved these changes Dec 17, 2020
Copy link
Contributor

@mlassnig mlassnig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is .... o.O

@bziemons
Copy link
Member

seems suspicious to me since date -> str functions in JavaScript are locale-controlled and this might be switched in FR/EN
sure about this change?

@mlassnig
Copy link
Contributor

On my default Firefox (US), it creates this for December 7:

https://rucio-ui.cern.ch:443/proxy/replicas/suspicious/?rse_expression=tier=1&younger_than=2020-07-12T00:00:00&nattempts=10

If I change my browser language and locale to DE, it creates 2020-07-12 still.

@mlassnig mlassnig dismissed their stale review December 17, 2020 09:41

Use "$.datepicker.setDefaults( $.datepicker.regional[ "ISO_8601" ] );" instead

@mlassnig
Copy link
Contributor

mlassnig commented Dec 17, 2020

This forces the locale for the datepicker, regardless what the browser wants. See here: https://api.jqueryui.com/datepicker/#method-option

@bziemons
Copy link
Member

bziemons commented Dec 17, 2020

it will return the date as 2020-12-24 though, so split by - instead of /, see https://jqueryui.com/datepicker/#date-formats

Edit: split is not needed anymore instead, which is even better

@bari12
Copy link
Member

bari12 commented Jan 25, 2021

Ping, what's the status here?

@dchristidis dchristidis marked this pull request as draft January 25, 2021 13:35
@dchristidis
Copy link
Contributor Author

I’ll come back to this after things calm down. :D

@bari12
Copy link
Member

bari12 commented Apr 6, 2021

Another ping 🛎️ 😄

@dchristidis
Copy link
Contributor Author

dchristidis commented Apr 19, 2021

Replaced with #4556 (patch instead of feature).

@dchristidis dchristidis deleted the feature-4184-WebUI__Fix_misinterpretation_of_the_date_picker branch April 19, 2021 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Suspicious replicas page is misinterpreting the date picker
4 participants