Hi everyone,
I’ve been using the Grist calendar widget with French and European data and ran into a few rough edges. After digging into the code I ended up fixing four issues, and I figured I’d share for anyone in a similar situation.
The fixes
-
Initial date — The widget was jumping to the first selected record’s date on load instead of showing today. Fixed with a one-shot flag that lands on today at startup.
-
First day of week — Always started on Sunday regardless of locale. Now reads
Intl.Locale.getWeekInfo()and respects the GristcultureURL parameter, so French/European users see Monday-first weeks automatically. -
12h/24h time format — Time slots in the day/week view were always in 24h format. Now auto-detects the locale preference via
Intl.DateTimeFormat.resolvedOptions().hour12, soen-USusers get2 PMandfr-FRusers get14:00. -
Pure Date columns — When Start/End are mapped to
Datecolumns (no time component), the hourly time grid was wasted space. Now it hides automatically and the all-day panel expands to fill the view.
Try it now
All four fixes are live on my fork’s GitHub Pages — just point your custom widget URL to:
https://lmzr.github.io/grist-widget/calendar/index.html
It’s a drop-in replacement for the standard widget.
Note: To get translated labels (day names, months, buttons…), append ?language=fr directly to the widget URL:
https://lmzr.github.io/grist-widget/calendar/index.html?language=fr
Grist currently forces en as the default language regardless of your account or document settings.
For the Grist team ![]()
I’ve submitted PRs for each fix against gristlabs/grist-widget:
Happy to discuss or adjust based on feedback!