Giter Site home page Giter Site logo

Comments (6)

SundeepK avatar SundeepK commented on May 5, 2024

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.

javobal avatar javobal commented on May 5, 2024

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.

SundeepK avatar SundeepK commented on May 5, 2024

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.

SundeepK avatar SundeepK commented on May 5, 2024

Will need to release changes. Will update ticket once that's done.

from compactcalendarview.

SundeepK avatar SundeepK commented on May 5, 2024

Available in

dependencies {
    compile 'com.github.sundeepk:compact-calendar-view:1.7.1'
}

from compactcalendarview.

javobal avatar javobal commented on May 5, 2024

Thank you, SundeepK

from compactcalendarview.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.