How to Restrict the Date and Time?

It sounds to me like a very cumbersome solution to a very simple problem.
Is there no simpler solution?