ArchitShah248 / CalendarDateRangePicker

Library to pick date range

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

issue with setSelectableDateRange

RnldStephen opened this issue · comments

I set the date range from 1/1/2020 to the current date.
But if i select today's date it give an exception saying selected date range cannot exceed selectable date range.

Hi @RnldStephen , can you please paste your code here so that I can reproduce the same issue?

` Calendar endrange = Calendar.getInstance();
Calendar startRange = Calendar.getInstance();
SimpleDateFormat df = new SimpleDateFormat("dd-MM-yyyy");

try {
Date df = df.parse("01-01-2020");
startRange.setTime(df)
cal.setSelectableDateRange(startRange ,endrange);
} catch (ParseException e) {
e.printStackTrace();
} `

So the start date is 1/1/2020 and the end date would be the current date . Let's say that the current date is April 17 2020. So if I click on April 17 2020 in the calender it crashes with the error that the selected date is higher than the allowed range

But the dates after 17 are disabled and not clickable that works fine

Thanks @RnldStephen , I am able to reproduce the issue. It'll be fixed in V1.1.7.

Yes, V1.1.7 has been published. You can use it in your application. Test it and let me know your feedback.

Happy coding!!

Thanks @RnldStephen for the quick validation.