Giter Site home page Giter Site logo

Comments (8)

grobarko avatar grobarko commented on July 29, 2024

Yes, selected day is a necessity.

from compactcalendarview.

SundeepK avatar SundeepK commented on July 29, 2024

Umm interesting, I never noticed this but I made a mistake when naming a method. setMonth actually sets the current day rather than the month. So, as a work around, on a day click you can use setMonth but just pass the currentdate. This will redraw the calendar and highlight the day for you.

I'll put in a fix to set the day automatically when a day is selected and fix that method name to be something like, "setDay" and add a method to set the month as well. Thanks for pointing this one out.

from compactcalendarview.

GabiR avatar GabiR commented on July 29, 2024

Ok, it is loading pretty slow when redrawing the calendar with setMonth() so it isn't the best solution.

from compactcalendarview.

SundeepK avatar SundeepK commented on July 29, 2024

Yeah, this is a temporary work around to get the functionality working until I fix the bug. Actually, it will redraw all three calendars (previous month, current month and next month). Ideally, selecting a day should draw only the current month which should improve any performance problems.

Alternatively, remove the background for the previous day that was selected and draw a new one where the current one is. This will require more code changes but probably be the best way to do it.

from compactcalendarview.

GabiR avatar GabiR commented on July 29, 2024

When do you estimate that the bug will be fixed? 😄

from compactcalendarview.

SundeepK avatar SundeepK commented on July 29, 2024

I'll try squeeze the change in the next few days if I can, but I can be busy because of work and what not.

from compactcalendarview.

SundeepK avatar SundeepK commented on July 29, 2024

I think the actual slowness was caused by the listener being called too early. This is because the listener would be called before the actual calendar was redrawn. So, if the code in clients implementation of the CompactCalendarViewListener did alot of processing, then it would delay the calendar from being drawn. This probably made it seem like it was slow in drawing. So I re-factored things slightly, so that the calendar would be drawn first and then the listener for a day click is called, which seems more correct.

from compactcalendarview.

SundeepK avatar SundeepK commented on July 29, 2024

Note, setMonth has been replace by setCurrentDate since it actually describes what its doing better.

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.