Preventing entry of wrong dates by closing periods