Skip to content

Single date selection added.#27

Open
ajoykarmakar459 wants to merge 1 commit intomiraan:masterfrom
ajoykarmakar459:master
Open

Single date selection added.#27
ajoykarmakar459 wants to merge 1 commit intomiraan:masterfrom
ajoykarmakar459:master

Conversation

@ajoykarmakar459
Copy link

Previously I have found that we can select multiple dates with these awesome plugins but faced issues while selecting a single date. So I have changed some code in this swift file so the user can select single or multiple both dates. Please merge this code so I can directly fetch the updated code with "pod install" and I hope many users like me still facing the same issues.
Best Regards,
Ajoy Karmakar

Previously I have found that we can select multiple dates with these awesome plugins but faced issues while selecting a single date. So I have changed some code in this swift file so the user can select single or multiple both dates. Please merge this code so I can directly fetch the updated code with "pod install" and I hope many users like me still facing the same issues.
Best Regards,
Ajoy Karmakar
@osmantufekci
Copy link

osmantufekci commented Feb 20, 2020

if you need to use like dd.MM.yyyy-dd.MM.yyyy.

inside the CalendarDateRangePickerViewController.Swift file, navigate didTapDone() function and edit like this:

@objc func didTapDone() {
        if selectedStartDate != nil && selectedEndDate == nil{
            delegate.didTapDoneWithDateRange(startDate: selectedStartDate!, endDate: selectedStartDate!)
        }else if selectedStartDate == nil || selectedEndDate == nil {
            return
        }else{
            delegate.didTapDoneWithDateRange(startDate: selectedStartDate!, endDate: selectedEndDate!)
        }
    }

much easier and cleaner. just select a date, if user won't select second date, it will send both selectedStartDate

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

Successfully merging this pull request may close these issues.

3 participants