(un)set class "unpublished" after changing publication date on the client-side