Basically if a day is selected and then disabled, the selection is cleared and, by tapping on another day, the crash happens.
My solution is to check the size of the selected days array before trying to get the first element and also allow to select the tapped day even if there is no day to deselect.
The widget led to app crash when selecting a day in the one day picker mode if no days were previously selected.
To mimic this behaviour you can add this code on the sample app, OneDayPickerActivity, row 37:
`
`
Basically if a day is selected and then disabled, the selection is cleared and, by tapping on another day, the crash happens.
My solution is to check the size of the selected days array before trying to get the first element and also allow to select the tapped day even if there is no day to deselect.