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

Day.js Timezone Plugin: .tz() Function Not Working in Capacitor WebView on Android and iOS #2747

Open
Ruryk opened this issue Oct 16, 2024 · 0 comments

Comments

@Ruryk
Copy link

Ruryk commented Oct 16, 2024

Bug
When using Day.js with the timezone plugin in a Capacitor WebView, an error occurs:
"TypeError: Dv(...).tz is not a function."

Expected behaviour
The .tz function should correctly process and convert timezones as expected when using the Day.js timezone plugin. The method should allow manipulating and displaying time in different time zones without throwing an error.

Information
Day.js Versions: 1.11.13, 1.11.7
Operating System: Android, iOS
Capacitor Version: 5.7.8
Environment: Capacitor WebView

This issue persists even after updating to the latest Day.js versions and ensuring all dependencies are properly installed. The same code works as expected in a browser but fails within the Capacitor WebView on both Android and iOS. Screenshots have been attached for further reference.

Screenshots
The attached screenshots were captured using chrome://inspect/#devices for remote debugging of the WebView:

image
image

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

1 participant