nathank
(Nathan Kershaw)
February 18, 2025, 12:50am
1
When I use the dates functionality within a poll, the dates/times do not seem to be rendering correctly in the post. Interestingly they seem fine in the preview:
2 Likes
sam
(Sam Saffron)
February 18, 2025, 5:08am
2
Going to put a pr-welcome on this for now and let @lindsey know …
Just double checking the issue:
2025-02-17T13:00:00Z
2025-02-18T13:00:00Z
Note there is also a rendering issue after you vote that needs fixing (box with dates moves to an odd place.
My guess here is that chains decorating cooked struggle here with the poll rendering.
3 Likes
just want to be clear, the expected result is the preview is that true
sam
(Sam Saffron)
February 19, 2025, 4:51am
4
Yes we should be aligned with the preview here.
[sondage de type=“multiple” résultats=“toujours” public=“true” nom=“sondage2” chartType=“bar” max=“2” min=“1”]
* 2019-10-13T00:00:00Z * 2019-10-12T00:00:00Z * 2019-10-11T00:00:00Z
* 2019-10-13T00:00:00Z * * 2019-10-11T00:00:00Z
[/sondage]
Hey, just a quick update. I had much time to look through this, but I was able to reproduce this issue in my local environment by creating a poll. I looked at the logic of discourse-local-dates and local dates builde, and I had a question on what is the site_settings that the code is referring to. I don’t want to assume that it is the timezone preference on the settings page. I was able to confirm that just adding a date works. So this issue is only isolated to polls. my current theory is that issue the way he handle timezones.
2 Likes
nathank
(Nathan Kershaw)
June 26, 2025, 6:12am
12
I note that a fix to a similar problem within Polls has just been made:
Any chance of a wave of the dark magic for this too?
2 Likes
Moin
December 18, 2025, 5:42pm
13
Dates in polls were fixed today
main ← fix-support-local-dates-in-poll-options
merged 12:30PM - 18 Dec 25 UTC
This change enables local dates to render properly in poll options and improves … how dates are displayed in the rich editor.
What changed:
- Rich editor now displays localized, human-friendly dates (e.g., "Today at 2:30 PM") instead of raw date strings ("2021-01-01 12:00:00") by using LocalDateBuilder
- Poll options can now include local dates that are properly decorated and interactive
- Added keyboard shortcut (Cmd/Ctrl+Shift+.) to insert current date markup in poll option inputs
- Extracted reusable utilities: formatLocalDate for rendering and generateCurrentDateMarkup for BBCode generation
How it works:
- New NULL_HELPER export in decorated-html provides a null-safe helper object for contexts without a post/model, allowing HTML decorators to work in poll options
- New Ember modifiers (decorate-cooked-content, decorate-poll-option) apply decorators to poll content
- Tests updated to verify data attributes rather than text content, since formatted dates vary by timezone
Internal ref - t/155024
**BEFORE/AFTER (markdown editor)**
<img width="1699" height="1327" alt="CleanShot 2025-12-16 at 11 59 22" src="https://github.com/user-attachments/assets/ff9fbb2b-0f1b-41b7-b0fc-b59c73ed4e32" />
<img width="1699" height="1327" alt="CleanShot 2025-12-16 at 11 59 42" src="https://github.com/user-attachments/assets/6b07beab-e864-4319-b97b-fe7abe2180e6" />
**BEFORE/AFTER (rich text editor)**
<img width="1699" height="1327" alt="CleanShot 2025-12-16 at 12 00 05" src="https://github.com/user-attachments/assets/0f0e1a4b-0829-4e0e-94ac-90f16c4e52d5" />
<img width="1699" height="1327" alt="CleanShot 2025-12-16 at 11 59 52" src="https://github.com/user-attachments/assets/d8db2e7a-c110-41bd-9fbf-b4af0f5de2c5" />
When do you typically receive your Christmas gifts?
December 5, 2025
December 7, 2025
December 23, 2025
December 24, 2025
December 25, 2025
January 5, 2026
other
5 Likes
mcwumbly
(Dave McClure)
Closed
December 22, 2025, 1:00pm
14
This topic was automatically closed after 3 days. New replies are no longer allowed.