android-times-square
android-times-square copied to clipboard
Range Selection
Hi, I am trying to make a booking application where number of days will be mentioned, and I need to display those number of days after selecting the start date with RANGE, can we do it ? if so please help me for this
Hi, i am trying to do the same thing. So did you managed it to make it work like that?
Hi! I know my answer is late. I hope you can solve it but if not, this is what I did:
I am using the calendar for a booking app too. Sometimes the reservation needs to has a minimum number of nights. When you click for check-in is necessary to block the next days along with the clicked date. To do this, you can add a listener for the click to the CalendarPickerView, in there you can catch the date. You will need to check if the clicked date is for check-in or check out. If it is for check out you will need to check if the difference between check-in date and check-out date is bigger than the minimum nights, if not, you will need to "block" the cell. To do this you will need to call OnInvalidDateSelectedListener.onInvalidDateSelected (date); this will show a message and won't allow the selection for the date. Also, if you use CalendarPickerView.highlightDates (dates); where dates is a list with the blocked dates you can change the appearance of the cells to show they are blocked. In this case, you will need to create a list with the next dates until the minimum nights are completed. I hope I can explain it if not feel free to contact me and maybe I can help.