Git Product home page Git Product logo

Comments (6)

AndroidJunior9 avatar AndroidJunior9 commented on July 17, 2024

I am working on this issue. I think the problem is with the KalendarPagingSource Class. In this class we filter the kalendar items.

Screenshot (1)

I think the kalendaritems are not filtered correctly. I am not sure though. I think it should be changed from:
val kalendarItems = kalendarRepository.generateDates(page) .filter { date -> date.year >= today.year && date.month.value >= today.monthNumber }
to
val kalendarItems = kalendarRepository.generateDates(page) .filter { date -> date.year >= today.year && date.month.value >= today.monthNumber }

What happens is that when we filter dates in the first example, we say that the year should be greater than or equal to the current year which is 2023. It means that only dates whose year is greater than or equal to 2023 are allowed. Thats fine but the problem here is that the months are also filtered according to the today's month. Thats why we say see august month after December as any dates before the month of august are not in the kalendaritems.

In the next example we solve this issue.

I have created a pull request too for this issue: Fixed InCorrect Month Progression Bug

from kalendar.

ParkJongJoon7128 avatar ParkJongJoon7128 commented on July 17, 2024

how did u make a dot on Day?

from kalendar.

AndroidJunior9 avatar AndroidJunior9 commented on July 17, 2024

Just Use the KalendarEvents function inside the Kalendar

from kalendar.

ParkJongJoon7128 avatar ParkJongJoon7128 commented on July 17, 2024

can u show how to use it like for instance?

from kalendar.

AndroidJunior9 avatar AndroidJunior9 commented on July 17, 2024

Sure, Here is an example how you can add events to your calendar

Kalendar(          currentDay = currentDay,          kalendarType = kalendarType,          modifier = modifier,          daySelectionMode = daySelectionMode,          showLabel = showLabel,          kalendarHeaderTextKonfig = kalendarHeaderTextKonfig,          kalendarColors = kalendarColors,          kalendarDayKonfig = kalendarDayKonfig,          onDayClick = onDayClick,          dayContent = dayContent,          headerContent = headerContent,          events = KalendarEvents(                  listOf(KalendarEvent(                         date = //date                          eventName  = "event"//add your event name                  )          ),          onRangeSelected = onRangeSelected,          onErrorRangeSelected = onErrorRangeSelected      ) }

from kalendar.

ParkJongJoon7128 avatar ParkJongJoon7128 commented on July 17, 2024

I dont know how to set dot in day each....

Could u share me ur code..? I want to refer to it

from kalendar.

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.