From 623a2362ac439a31c52c59c8b84afa7901f462b2 Mon Sep 17 00:00:00 2001 From: Karolis Dzeja Date: Wed, 16 Oct 2013 00:30:25 -0500 Subject: [PATCH] Fix notification bug The date stored in the model is in a different format and needs to be converted before being checked. Otherwise, any blur event will trigger the notification that the date has been changed, even if the date is the same. --- ghost/admin/views/post-settings.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ghost/admin/views/post-settings.js b/ghost/admin/views/post-settings.js index e012791f27..696e0c1b98 100644 --- a/ghost/admin/views/post-settings.js +++ b/ghost/admin/views/post-settings.js @@ -90,7 +90,7 @@ newPubDate = pubDateEl.value; // Ensure the published date has changed - if (newPubDate.length === 0 || pubDate === newPubDate) { + if (newPubDate.length === 0 || moment(pubDate).format("DD MMM YY") === newPubDate) { pubDateEl.value = pubDate === undefined ? 'Not Published' : moment(pubDate).format("DD MMM YY"); return; } @@ -192,4 +192,4 @@ }); -}()); \ No newline at end of file +}());