date validation bug fixed