Closed rama-2402 closed 3 years ago
BTW i've found the issue.
I've used "min" instead of "max" in,
val max = CalendarFactory.newInstance(CalendarType.CIVIL)
min.add(Calendar.DAY_OF_MONTH, +2)
changing this fixed the issue. :)
If anyone's looking,
you can use this function to get the Int value for the min and max dates
private fun getDate(date: Long): Int {
var diff = (date - System.currentTimeMillis())/ (24 * 60 * 60 * 1000)
return diff.toInt()
}
val min = CalendarFactory.newInstance(CalendarType.CIVIL)
min.add(Calendar.DAY_OF_MONTH, -getDate($timeInMillis))
val max = CalendarFactory.newInstance(CalendarType.CIVIL)
max.add(Calendar.DAY_OF_MONTH, +getDate($timeInMillis))
Hi thanks for the awesome library, you have mentioned .minPossibleDate(minDate: PrimeCalendar), .minPossibleDate(maxDate: PrimeCalendar) for setting minimum and maximum dates for selection. I was wondering if the minimum and maximum dates can be set based on Calendar.DAY_OF_MONTH.
For example, dates to be available for selection only between the range of given date.
I tried the following,
But the calendar dates are not showing up in the dialog. Could you please provide some example code as to how i can implement this. Thanks :)