datepick bug fix