Preventing entry to wrong dates by closing periods