Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash on date picker #579

Open
chinkal07 opened this issue Jul 18, 2024 · 1 comment
Open

Crash on date picker #579

chinkal07 opened this issue Jul 18, 2024 · 1 comment

Comments

@chinkal07
Copy link

chinkal07 commented Jul 18, 2024

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)

@Wei18
Copy link
Collaborator

Wei18 commented Nov 2, 2024

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants