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.
This commit is contained in:
Karolis Dzeja 2013-10-16 00:30:25 -05:00
parent 5f3f0d013b
commit 88d0303093

View File

@ -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 @@
});
}());
}());