-
-
Notifications
You must be signed in to change notification settings - Fork 1.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
[BUG] Public Holidays widget returns Invalid Date on Safari #1532
Comments
If you're enjoying Dashy, consider dropping us a ⭐ |
Linking this to #894 |
Which config did you use for this? And if you pop open the browser console, and run
Thanks @pdxrlk, but I'm hesitant to add in Moment.js as since that StackOverflow discussion was written, in 2010, we now have all the date parsing needed included in the browser APIs using |
Thank you region is SLV ( America/El_Salvador)GraciasUlises MolinaOn May 9, 2024, at 4:16 PM, Alicia Sykes ***@***.***> wrote:
Which config did you use for this?
I'm interested to know the region, as that would let me send an API request, and see what weird format the dates are coming back in.
And if you pop open the browser console, and run navigator.language - what's the output?
I suspect the issue is with the toLocaleDataString call in MiscHelper.js. Maybe use moment.js instead? (see for example, this discussion).
Thanks @pdxrlk, but I'm hesitant to add in Moment.js as since that StackOverflow discussion was written, in 2010, we now have all the date parsing needed included in the browser APIs using toLocaleDateString, and unless you're using a reallyyyy old version of Safari, then it should be supported there as well.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: ***@***.***>
|
Hey @umolinar, Thanks for the info. I just tested, but it seems to work okay for me using the below config - type: public-holidays
options:
country: SV
holidayType: all
monthsToShow: 12
lang: en |
It does not for me, at the moment I am on my iPhone
Gracias, Thanks,
Ulises Molina
+503 7049 5062
…On Thu, May 9, 2024 at 5:42 PM Alicia Sykes ***@***.***> wrote:
Hey @umolinar <https://github.com/umolinar>,
Thanks for the info. I just tested, but it seems to work okay for me using
the below config
image.png (view on web)
<https://github.com/Lissy93/dashy/assets/1862727/1fe54417-15d3-4e4a-92a2-be2c3f4fb8dd>
- type: public-holidays
options:
country: SV
holidayType: all
monthsToShow: 12
lang: en
—
Reply to this email directly, view it on GitHub
<#1532 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BGEOKVTPKFA73ARXIFDIFKLZBQCXXAVCNFSM6AAAAABGKBVWJCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBTGYYTAMBXGI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I can confirm on my iPad the dates do not show up. |
Thank you, if I can help, let me know!GraciasUlises MolinaOn May 9, 2024, at 5:50 PM, Tobias ***@***.***> wrote:
I can confirm on my iPad the dates do not show up.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Thanks @CrazyWolf13 and @umolinar, I think I see the issue - Safari parses dates weirdly. P.s. I'm a bit jealous about how many public holidays you get!! 🏖️😆 |
Thank you, I am sure Mexico gets more!
Gracias, Thanks,
Ulises Molina
+503 7049 5062
…On Thu, May 9, 2024 at 6:06 PM Alicia Sykes ***@***.***> wrote:
Thanks @CrazyWolf13 <https://github.com/CrazyWolf13> and @umolinar
<https://github.com/umolinar>, I think I see the issue - Safari parses
dates weirdly.
Fix coming in #1577 <#1577>
P.s. I'm a bit jealous about how many public holidays you get!! 🏖️😆
—
Reply to this email directly, view it on GitHub
<#1532 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BGEOKVWQW5HSKU6ITZ2SQX3ZBQFQTAVCNFSM6AAAAABGKBVWJCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBTGYZDMOBYGA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Sorry last question, what directory and what file do I make these changes? Or do I need to reinstall?GraciasUlises MolinaOn May 9, 2024, at 6:09 PM, Alicia Sykes ***@***.***> wrote:
Closed #1532 as completed via eea193a.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
As soon as a new release will happen, those changes will be included. If you need furter help let me know. |
Environment
Self-Hosted (Docker)
System
Safari (macOS)
Version
2.1.2
Describe the problem
The Public Holidays widget displays "Invalid Date" for all dates on Safari (MacOs). It works fine on Firefox and Chrome.
Additional info
I suspect the issue is with the toLocaleDataString call in MiscHelper.js. Maybe use moment.js instead? (see for example, this discussion).
Please tick the boxes
The text was updated successfully, but these errors were encountered: