Date range restrictions do not seem to be working properly