FEATURE: adds support for dates in polls (#7450)

FEATURE: adds support for dates in polls (#7450)

diff --git a/plugins/poll/assets/javascripts/widgets/discourse-poll.js.es6 b/plugins/poll/assets/javascripts/widgets/discourse-poll.js.es6
index 8a5005c..1c2954f 100644
--- a/plugins/poll/assets/javascripts/widgets/discourse-poll.js.es6
+++ b/plugins/poll/assets/javascripts/widgets/discourse-poll.js.es6
@@ -10,7 +10,13 @@ import round from "discourse/lib/round";
 import { relativeAge } from "discourse/lib/formatter";
 
 function optionHtml(option) {
-  return new RawHtml({ html: `<span>${option.html}</span>` });
+  const $node = $(`<span>${option.html}</span>`);
+
+  $node.find(".discourse-local-date").each((_index, elem) => {
+    $(elem).applyLocalDates();
+  });
+
+  return new RawHtml({ html: `<span>${$node.html()}</span>` });
 }
 
 function infoTextHtml(text) {

GitHub sha: 1d784c7a

1 Like