fix date picker's bug - invalid date