-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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 work in safari #254
Comments
@wukong1995 Tested on my Mac safari and works fine. And further information you could supply? dayjs('2018-03-27').format('D') |
@iamkun I debug and find the error.
in chrome: it show 2018-03-27 |
@wukong1995 try |
try |
I use this to be compatible with ios. // util.js
import dayjs from 'dayjs'
const _dayjs = (date, c) => {
if (typeof date === 'string') date = date.replace(/-/g, '/')
return dayjs(date, c)
}
export default _dayjs in safari, use |
I think you should fix the code to support the way like this writing. |
This is clearly a problem. The fix suggested works but is hacky. This should be taken as a major bug. I am considering switching back to momentjs. I see this same issue on mobile react-native Android but works fine on iOS |
This is also a problem in Firefox, as of 62.0b20 on OS X 10.14.1. I had to fix it by changing all my date formats to |
From my testing it only works in chrome and opera. Edge/IE, firefox, safari are all broken. |
## [1.8.3](v1.8.2...v1.8.3) (2019-02-04) ### Bug Fixes * fix ios safari YYYY-MM-DD HH:mm parse BUG ([e02ae82](e02ae82)), closes [#254](#254)
🎉 This issue has been resolved in version 1.8.3 🎉 The release is available on: Your semantic-release bot 📦🚀 |
I can confirm this resolved the issues we were seeing in Chrome & Safari on OSX (not windows) |
This is still not working in safari. dayjs('2019-02-28T19:05:00+0000') is still returning null in Safari. |
@eric-personal |
## [1.8.3](iamkun/dayjs@v1.8.2...v1.8.3) (2019-02-04) ### Bug Fixes * fix ios safari YYYY-MM-DD HH:mm parse BUG ([e02ae82](iamkun/dayjs@e02ae82)), closes [#254](iamkun/dayjs#254)
## [1.8.3](iamkun/dayjs@v1.8.2...v1.8.3) (2019-02-04) ### Bug Fixes * fix ios safari YYYY-MM-DD HH:mm parse BUG ([e02ae82](iamkun/dayjs@e02ae82)), closes [#254](iamkun/dayjs#254)
dayjs("Feb 2023") is not working on safari while works well on chrome. Is this usage not intended? Update: |
still an issue @iamkun :
Is dayJs getting some locale from safari and it then can't recognise dates with dashes in them? |
Still having an error in Safari doing various things with |
you're a lifesaver |
## [1.8.3](iamkun/dayjs@v1.8.2...v1.8.3) (2019-02-04) ### Bug Fixes * fix ios safari YYYY-MM-DD HH:mm parse BUG ([e02ae82](iamkun/dayjs@e02ae82)), closes [#254](iamkun/dayjs#254)
dayjs('2018-03-27').format('D')
in chrome: it is work and it show 27
in safari: it is not work and it show NaN
The text was updated successfully, but these errors were encountered: