fixed date validation bug