date and time validation (js)