added method of getting date from DatePicker.