Here am trying to pick some date from date picker.
suppose i picked 2018-02-05 from action sheet. but in output am getting 2018-02-04.
here is the following code i tried. In print(value), i got following output
Output: 2018-02-04 18:30:00 +0000
func dateAndTimePicker(_ sender: Any){
let datePicker = ActionSheetDatePicker(title: "Date", datePickerMode: UIDatePickerMode.date, selectedDate: NSDate() as Date!, doneBlock: {
picker, value, index in
print(value)
return
}, cancel: { ActionStringCancelBlock in return }, origin: (sender as AnyObject).superview!?.superview)
datePicker?.show()
}
Here am trying to pick some date from date picker. suppose i picked 2018-02-05 from action sheet. but in output am getting 2018-02-04. here is the following code i tried. In print(value), i got following output Output: 2018-02-04 18:30:00 +0000