Android custom calendar view disable specific dates
-
i'm new to android developing and started to develop an booking app. There is a calendar view and i want to disable booked dates in that calendar. I found out that disabling feature is not there in android default calendar. so could you please help me to find a good custom calendar view that can disable specific dates. I need a resource or a library. Thank you!
-
Answer:
Include CalendarPickerView in your layout XML. <com.squareup.timessquare.CalendarPickerView android:id="@+id/calendar_view" android:layout_width="match_parent" android:layout_height="match_parent" /> In the onCreate of your activity/dialog or the onCreateView of your fragment, initialize the view with a range of valid dates as well as the currently selected date. Calendar nextYear = Calendar.getInstance(); nextYear.add(Calendar.YEAR, 1); CalendarPickerView calendar = (CalendarPickerView) findViewById(R.id.calendar_view); Date today = new Date(); calendar.init(today, nextYear.getTime()).withSelectedDate(today); github link- https://github.com/square/android-times-square
user2214782 at Stack Overflow Visit the source
Related Q & A:
- how to perform certain code on specific time in android?Best solution by Yahoo! Answers
- How to add calendar events in other calendar in Android?Best solution by Stack Overflow
- How to query calendar with events from a specific date?Best solution by stackoverflow.com
- How to make my own Android custom calendar?Best solution by Stack Overflow
- How to add new view at the top of an existing view in Android?Best solution by Stack Overflow
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.