CompactCalendarView icon indicating copy to clipboard operation
CompactCalendarView copied to clipboard

Disable dates lower than current date

Open darkholiday opened this issue 9 years ago • 16 comments

I want to disable dates lower than current date any tips?

darkholiday avatar Jun 21 '16 05:06 darkholiday

Hi, do you mean not making them clickable and greyed out? Do you have any more info on what you need.

SundeepK avatar Jun 21 '16 11:06 SundeepK

yeah just like that. and ty

darkholiday avatar Jun 22 '16 02:06 darkholiday

is there any update on this?

erolasan avatar Nov 19 '16 14:11 erolasan

@erolasan Unfortunately, not yet. There is a backlog of enhancements and pull request that I am going through at the moment.

SundeepK avatar Nov 21 '16 10:11 SundeepK

@SundeepK I had the same need and implemented a setMinimumDate on the calendar to disable the selection of dates before that minimumDate. The disabled dates are drawn in a different color.

I'll probably add the setMaximumDate to be thorough and I'll submit a Pull Request. I haven't yet prevented scrolling through the month that are not allowed as requested in issue #51 as it looks a lot more complex.

JulienArzul avatar Nov 21 '16 17:11 JulienArzul

@JulienArzul can you please describe how you achieved that..? I have similar requirement but in reverse way. I need to show daily attendance, so I want to disable and grey-out the days after current day.. @SundeepK any progress on this enhancement.?

sarpotdarsaurabh avatar Mar 30 '17 08:03 sarpotdarsaurabh

Sorry I didn't take the time to provide a Pull-Request...

@sarpotdarsaurabh I won't enter into the full details of the impl but the part of the code that you should look at is in the CompactCalendarController.java file, starting at line 868. That is where the days of the months are drawn. You can change the paint used for drawing on specific days.

JulienArzul avatar Mar 31 '17 04:03 JulienArzul

did you add it? i need to set a min date . who can help me? please

gustavofc1997 avatar Apr 17 '17 22:04 gustavofc1997

The minimum/maximum month limit is something I need as well (as in, if the compact calendar reaches the last month in either direction, don't let it scroll to the previous/next one when swiping). For now, I'm programatically returning to the limiting month, but it's a rather ugly work-around.

kazume avatar Aug 01 '17 21:08 kazume

Any updates?

alexanderboyko avatar Nov 25 '17 15:11 alexanderboyko

update??

utsmannn avatar Feb 07 '18 21:02 utsmannn

Any Update ? on how to disable Past dates ? that will be very help full.

muhammad-farhan-bakht avatar Sep 14 '18 09:09 muhammad-farhan-bakht

Any Update? 🙏🏻🙏🏻🙏🏻

Hila1 avatar Feb 20 '19 15:02 Hila1

Any Update? 🙏🏻🙏🏻🙏🏻 I have used the other Library then Contribute to it and Add this feature and then use that one :) you can find it in my Repository's.

muhammad-farhan-bakht avatar Feb 20 '19 18:02 muhammad-farhan-bakht

Dear SundeepK Sir Please give me suggestion about how to set minimum date.

sanjayajena37 avatar Jun 04 '19 10:06 sanjayajena37

Is there any way to do it?

goddmn avatar Apr 07 '21 04:04 goddmn