Comments (6)
Hi, the easiest way to achieve this currently is probably to track the current month. Then each time you click the previous/next button increment/decrement your counter. Create a new date instance by adding the counter to the month of a java Calendar object and call setCurrentDate(Date dateTimeMonth)
on the compact calendar instance, this will set the date on the calendar to the one passed in and will update the calendar to the correct month. This is a bit of an inconvenience :(.
There is no easy way to achieve this since the calendar doesn't expose such functionality in the api, for example like showNextMonth/showPreviousMonth. Is this something you would like? If you want I can add this functionality sometime this week.
Thanks.
from compactcalendarview.
well it ended being not that inconvenient, since i am using JodaTime in my app, what i did based on your recommendation, is use getFirstDayOfCurrentMonth(); to obtain a date and later with joda time i added one month and set it.
public void onClick(View v) {
Date fechaActual = compactCalendarView.getFirstDayOfCurrentMonth();
DateTime fechaA = new DateTime(fechaActual);
compactCalendarView.setCurrentDate(fechaA.plusMonths(1).toDate());
}
although it would be nice to have a method to do that in one line.
thanks for the support.
from compactcalendarview.
No problem, I will add some methods that will allow for this functionality some time later this week. So watch this ticket to keep up to date so that you know when to update to the latest.
from compactcalendarview.
Will need to release changes. Will update ticket once that's done.
from compactcalendarview.
Available in
dependencies {
compile 'com.github.sundeepk:compact-calendar-view:1.7.1'
}
from compactcalendarview.
Thank you, SundeepK
from compactcalendarview.
Related Issues (20)
- Swipe left and swipe right listener HOT 1
- Background color of abbreviations (weeks)
- Events from REST API
- Work on emulator but not on device
- One event on day : Big circle; multiple event on a day : Big circle + little dot
- Can I use another fonts?
- How to select more days and disable others days tap? How to enable tap only on selected days
- error with add event function
- Color description bar
- error: failed linking references.
- error: resource android:attr/lStar not found.
- using talkback
- Adding Events to CompactCalendar from api call
- Clear Selection
- How to remove the selected current date background when month is scrolled?
- How to present only 1 week ?
- How to pass Calendar as argument?
- Issue
- Events not showing in some android devices api level 33 HOT 1
- Cannot add event line indicator inside selected day circle
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from compactcalendarview.