Fixed bug in datepicker.

- Fixed bug when opening datepicker with chosen date.