When selecting a date field for the Preview image on a model the cool little calendar preview image doesn’t consider timezone resulting in a day discrepancy…
hello @brian1 can you please help me reproduce the problem? Can you share your personal settings in terms of timezone: the screen that you find here:
e.g.:
And also the project settings here:
Thank you
I was able to replicate this:
- Project time zone is set to UTC-7 (America/Los_Angeles)
- A date field is used as the model’s image preview field:
- The date field is set to a date:
But the preview image shows the wrong date:
Probably we’re parsing the 2025-07-09
string in the wrong time zone. I’ll take a look!
EDIT: I prepped a bugfix PR for this, but it will need to go through code review first! Will update here once it’s fixed.
@brian1, this bug should be fixed now. Please let us know if you notice any more occurrences of it!
(It was indeed a timezone issue on our side.)
And sorry again about the delay.
Lovely. Thanks as always @roger, I can confirm the fix on my end. Such a cool preview state for date driven records. Stoked to use it now.
Great, thanks for checking!
PS I don’t know if you know this, but with the plugin SDK, you can make your own data-driven previews: Customize record presentation | Documentation — DatoCMS
A recent example from the forum: Display svg in editor's view, eg: record list page when using Everything SVG plugin [Modified title]
Source code here: https://github.com/voorhoede/datocms-plugin-everything-svg/pull/4
SWEEEEET. Love it @roger. Thanks for posting that