moved datetime JS from view