ActionSheetPicker-3.0 icon indicating copy to clipboard operation
ActionSheetPicker-3.0 copied to clipboard

Crash on date picker

Open chinkal07 opened this issue 1 year ago • 1 comments

App is getting crashed on selecting Date..

function used in app: let actionSheetDatePicker = ActionSheetDatePicker(title: "", datePickerMode: .date, selectedDate: date, target: self, action: #selector(self.dateWasSelected(selectedDate:element:)), origin: dateView) actionSheetDatePicker?.addCustomButton(withTitle: "Today", value: Date()) // actionSheetDatePicker?.addCustomButton(withTitle: "Select Date", value: Date())

    actionSheetDatePicker?.toolbarButtonsColor = UIColor.white
    actionSheetDatePicker?.toolbarBackgroundColor = UIColor.appTheme
    actionSheetDatePicker?.maximumDate = Date()
    
    // Allow 7 days future date for all prep item type
    if router?.dataStore?.addItemType is PrepItemType {
        actionSheetDatePicker?.maximumDate = Date().adjust(.day, offset: 7)
    }
    
    if #available(iOS 13.4, *) {
        actionSheetDatePicker?.datePickerStyle = .wheels
    }
    
    actionSheetDatePicker?.show()

Crash found on file: AbstractActionSheetPicker line 305: dispatch_async(dispatch_get_main_queue(), ^{

XCode error: Enqueued from com.apple.main-thread (Thread 1)

chinkal07 avatar Jul 18 '24 11:07 chinkal07

Could you try reproducing the issue with the latest version? If it still doesn’t work, please provide the iOS/iPadOS version and specify whether you're using a simulator or an actual device. Thanks!

wei18 avatar Nov 02 '24 02:11 wei18