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

[Calendar] Support safari to accept yyyy-mm-dd format using dashes #1647

Merged
merged 1 commit into from
Aug 19, 2020

Conversation

lubber-de
Copy link
Member

@lubber-de lubber-de commented Aug 18, 2020

Description

After implementing #1462, a pure given date in yyyy-mm-dd format did not work in safari anymore , because safari does not handle the internal converted date of yyyy-mm-dd 00:00:00

This PR now changes the dashes to slashes, so the internal result is yyyy/mm/dd 00:00:00, which is supported in every browser

Testcase

  • Use Safari

Broken

The given date 2020-08-12 results in August, 12, 2000
https://jsfiddle.net/lubber/s82zoc5w/

Fixed

The given date 2020-08-12 correctly results in August, 12, 2020 as in every other browser already
https://jsfiddle.net/lubber/s82zoc5w/2/

Screenshots

Broken

image

Fixed

image

Closes

#1462 (comment)

@lubber-de lubber-de added type/bug Any issue which is a bug or PR which fixes a bug lang/javascript Anything involving JavaScript state/awaiting-reviews Pull requests which are waiting for reviews labels Aug 18, 2020
@lubber-de lubber-de added this to the 2.8.7 milestone Aug 18, 2020
@lubber-de lubber-de added the browser/safari Any issues relating to Apple Safari label Aug 18, 2020
Copy link
Contributor

@exoego exoego left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@ko2in ko2in left a comment

Choose a reason for hiding this comment

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

I know that it's only change of regular expression in JS, but the calendar UI looks weird to me.
Calendar

@lubber-de
Copy link
Member Author

lubber-de commented Aug 19, 2020

What looks weird? I don't see it 🤔

@lubber-de
Copy link
Member Author

@ko2in Ah...the class for the calendar was missing... fixed jsfiddle here
https://jsfiddle.net/lubber/s82zoc5w/2/

@ko2in
Copy link
Member

ko2in commented Aug 19, 2020

What looks weird? I don't see it

There are spaces around the calendar. Looks like it doesn't happen to you.

@lubber-de
Copy link
Member Author

There are spaces around the calendar. Looks like it doesn't happen to you.

It does 😆 ... see comment above, jsfiddle fixed here https://jsfiddle.net/lubber/s82zoc5w/2/

Copy link
Member

@ko2in ko2in left a comment

Choose a reason for hiding this comment

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

LGTM.

@lubber-de lubber-de merged commit 2ddcc7b into fomantic:develop Aug 19, 2020
@lubber-de lubber-de deleted the fix/safariDate branch August 19, 2020 09:19
@lubber-de lubber-de removed the state/awaiting-reviews Pull requests which are waiting for reviews label Aug 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
browser/safari Any issues relating to Apple Safari lang/javascript Anything involving JavaScript type/bug Any issue which is a bug or PR which fixes a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants