savvisingh / DateRangePicker

Date Range Picker is a Calendar Picker View to show a Customized Date Range Picker with improved UI and functionality to add subtitles to the dates
Apache License 2.0
784 stars 160 forks source link

Setting cell click listener #43

Closed jerryHeld closed 5 years ago

jerryHeld commented 6 years ago

I've set cellClickListener like that - calendar.setCellClickInterceptor(new CalendarPickerView.CellClickInterceptor(){ @Override public boolean onCellClicked(Date date) { //do some stuff return false; } });

What does the return value is using for? Whats the difference between returning true or false?

savvisingh commented 5 years ago

If you return true the calendar view will not select the dates it means that you have already handled the click and you don't want the calendar to handle it by default, otherwise if you return true the calendar view will select those dates