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

Dayjs not working in safari with dayjs #931

Closed
Bluefitdev opened this issue Jun 16, 2020 · 5 comments
Closed

Dayjs not working in safari with dayjs #931

Bluefitdev opened this issue Jun 16, 2020 · 5 comments

Comments

@Bluefitdev
Copy link

Bluefitdev commented Jun 16, 2020

Describe the bug

as mentioned in #73 and #254 , my dayjs is not working in safari. Not sure how did you guys fixed it. It shows as invalid date on dayjs(2020-06-16T16:21:00+1000).format('HH:mm')

This is in the iso8601 format, goes like this: 2020-06-16T16:21:00+1000

It is perfect in chrome though..

Information

  • Day.js version: 1.8.28
  • Browser safari 13.1
@ghost
Copy link

ghost commented Jun 16, 2020

Try https://day.js.org/docs/en/parse/string-format CustomParseFormat plugin

@Bluefitdev
Copy link
Author

Yeah that one actually worked.. does this mean that as of current in safari we have to use that despite the iso format?

Sometimes its feels unnatural (becasue i'm using react) to initiate dayjs.extend in component useEffect when I just need to display formatted value at the body

@ghost
Copy link

ghost commented Jun 16, 2020

You only need to extend once in your index.js file. And use it everywhere.

@Bluefitdev
Copy link
Author

Ah i see... I didn't know that.

Alright then thanks

phamhieu added a commit to supabase/supabase that referenced this issue May 18, 2022
phamhieu added a commit to supabase/supabase that referenced this issue May 18, 2022
@ashishsurya
Copy link

Even though I am extending the "CustomParseFormat plugin" , I am getting the same issue

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

No branches or pull requests

2 participants