Troubleshooting

Common issues and solutions when integrating the Calendar Week widget.

Add data-terms="accepted" to your container element. This attribute is required and confirms you've read our Terms of Use.
Use the data-logic attribute to set the correct week numbering:
  • data-logic="iso" - ISO 8601 (Monday start, EU standard)
  • data-logic="us" - US standard (Sunday start)
Set data-lang="de" for German or data-lang="en" for English. This affects labels like "Week" / "Woche" and day names.
<p>Check your Content Security Policy (CSP): Ensure your CSP allows scripts from thecalendarweek.com.</p><p>Verify script placement: The script should load after the DOM container exists, or use the async attribute.</p><p>Check browser console: Look for network errors or blocked requests.</p>
For environments that restrict external JavaScript, use our iFrame Embed method instead. It runs safely in a sandboxed context without requiring any script approvals.
<p>HTTPS required: The widget fetches data from our API which requires HTTPS in production.</p><p>CORS: Our API allows all origins, but ensure your hosting doesn't block external scripts.</p><p>Cache issues: Clear your CDN/browser cache after deployment.</p>
Our API caches data for performance. On rare occasions, the cache may show the previous week briefly after midnight. This resolves automatically within a few minutes. If the issue persists, try a hard refresh (Ctrl+Shift+R).
<p>Check API connectivity: Ensure your network allows requests to thecalendarweek.com/api/week.json.</p><p>Firewall/proxy: Corporate networks may block unknown domains. Contact your IT team if needed.</p>
The widget uses Shadow DOM for style isolation and inherits font-family from the parent element. Ensure your container element has the desired font applied, or that your body/html has a font-family set. Note: Some designs (Classic, Analog) use specific fonts for aesthetic purposes.
<p>For Minimal design: Use data-size="large" for a larger variant with an icon.</p><p>For all designs: The widget scales with font-size. Set a font size on the container to control overall scale.</p>
Use the color override attributes: data-bg for background, data-text for text color, data-primary for accent color, and data-hover for hover effects.
The widget container (div.tcw-embed) has no inherent padding. Any spacing comes from your parent container. You can apply CSS directly to the container element to control layout.
<p>Avoid key changes: Ensure your widget container doesn't have a changing key prop.</p><p>Script loading: Use the useEffect pattern from our React Guide to properly load the script once.</p>
Wrap the widget in a client-only component using &lt;ClientOnly&gt; in Nuxt, or use onMounted for script loading in Vue 3. See our Vue Guide.
<p>Enable JavaScript: Ensure JavaScript is enabled in your WebView configuration.</p><p>Allow mixed content: For Android, you may need to enable mixed content mode if testing on HTTP.</p><p>See our Swift or Kotlin guides for complete setup.</p>
This is an informational log, not an error. It confirms the widget script loaded successfully and shows the API endpoint being used. You can safely ignore this message in production.
<p>This warning appears when the widget cannot fetch data from our API. Common causes:</p>
  • Network issues: Check your internet connection or firewall settings.
  • CSP blocking: Your Content-Security-Policy may block requests to thecalendarweek.com.
  • CORS: If using a custom endpoint, ensure it returns proper CORS headers.
<p>The widget will display "N/A" when this occurs.</p>
<p>This security warning appears when you've passed a potentially dangerous value to a color or style attribute. The widget blocks:</p>
  • javascript: protocol strings
  • url() CSS functions
  • Characters like ;, {}, &lt;&gt;
<p>Use simple color values like #FF5733 or rgb(255, 87, 51) instead.</p>
You've specified a data-design value that doesn't exist. Available designs are: minimal, classic, card, calendar, dashboard, analog. Check for typos in your design attribute.
<p>Your Content Security Policy is blocking our embed script. Add the following to your CSP header:</p><pre class="bg-gray-100 p-3 rounded text-xs font-mono overflow-x-auto mt-2">script-src 'self' https://thecalendarweek.com; connect-src 'self' https://thecalendarweek.com;</pre><p>If you're using a meta tag, update it to include our domain in both script-src and connect-src directives.</p>