Date validation fix