utkarsharma2 commented on code in PR #32465:
URL: https://github.com/apache/airflow/pull/32465#discussion_r1257838345


##########
airflow/www/static/js/task.js:
##########
@@ -25,12 +25,17 @@ import validator from "validator";
 document.addEventListener("DOMContentLoaded", () => {
   document.querySelectorAll(".js-ti-attr").forEach((attr) => {
     const value = attr.innerHTML;
+    const attrName = attr.previousElementSibling.textContent.trim();
     if (value.length === 32 && moment(value, "YYYY-MM-DD").isValid()) {
       // 32 is the length of our timestamps
       // eslint-disable-next-line no-param-reassign
       attr.innerHTML = "";
       const timeElement = document.createElement("time");
       timeElement.setAttribute("datetime", value);
+      timeElement.setAttribute(
+        "data-datetime-convert",
+        attrName === "execution_date" ? "false" : "true"
+      );

Review Comment:
   I think we should do this to all `execution_date` fields that are displayed 
in the UI. WDYT? 
   
   
https://github.com/search?q=repo%3Aapache%2Fairflow+execution_date+language%3AJavaScript&type=code&l=JavaScript
   
   Also, since there are multiple places we are displaying it. We should have 
common logic to control `data-datetime-convert=False` attribute in the view 
layer for `execution_date`. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to