Fixed the following bugs:

  - For loop only iterates the array elements (not properties, e.g.
    'remove')
  - If dDate is invalid, use 'picker.options.startDate' instead of
    undefined 'startDate'
  - If dDate is invalid, do not call format since it is called later