Date picking bug fix