Date formatting and keyboard hiding