JonasWanke / com.jonaswanke.calendar

📅 Material Design CalendarView for Android
Apache License 2.0
49 stars 16 forks source link

CalendarView doesn't work around December #64

Open ahashimoto opened 5 years ago

ahashimoto commented 5 years ago

Hi

We are trying to customize the CalendarView and use it in our developing app, but we found it doesn't work in December. Actually, if the system date of Android is changed to 12/08/2019, the example crashed. Seems InfinitePagerAdapter has a something bug about year-end.

Can you take a look at?

GianniLane commented 4 years ago

Hi

We are trying to customize the CalendarView and use it in our developing app, but we found it doesn't work in December. Actually, if the system date of Android is changed to 12/08/2019, the example crashed. Seems InfinitePagerAdapter has a something bug about year-end.

Can you take a look at?

I've been experiencing similar problems, sometimes I'll get a completely blank page when swiping too. Let me know if you find a solution, I'll do the same.

jigar1211 commented 3 years ago

Anyone find the solution?

jigar1211 commented 3 years ago

Hi

We are trying to customize the CalendarView and use it in our developing app, but we found it doesn't work in December. Actually, if the system date of Android is changed to 12/08/2019, the example crashed. Seems InfinitePagerAdapter has a something bug about year-end.

Can you take a look at?

Did you able to find solutions?

jigar1211 commented 3 years ago

Hi We are trying to customize the CalendarView and use it in our developing app, but we found it doesn't work in December. Actually, if the system date of Android is changed to 12/08/2019, the example crashed. Seems InfinitePagerAdapter has a something bug about year-end. Can you take a look at?

I've been experiencing similar problems, sometimes I'll get a completely blank page when swiping too. Let me know if you find a solution, I'll do the same.

Any solution?

jigar1211 commented 3 years ago

Actually Calendar doesn't work for week 52 and 53. I think issue is that after 51 week it consider next week as firat week of previous year

ahashimoto commented 3 years ago

Hi,

We use GregorianCalendar object instead of Calendar object in DayEventsView.kt to avoid the issue. Hope this help.

Thanks, Yoshiaki

jigar1211 commented 3 years ago

Hi,

We use GregorianCalendar object instead of Calendar object in DayEventsView.kt to avoid the issue. Hope this help.

Thanks, Yoshiaki

Hey, Thanks for replay. Can you able to put your code here. so it will be great for me. Thank you very much for your help

jigar1211 commented 3 years ago

Hi, We use GregorianCalendar object instead of Calendar object in DayEventsView.kt to avoid the issue. Hope this help. Thanks, Yoshiaki

Hey, Thanks for replay. Can you able to put your code here. so it will be great for me. Thank you very much for your help

Hey Check my code below of DayEventsView.kt

======= package com.jonaswanke.calendar

import android.content.Context import android.graphics.Canvas import android.graphics.Color import android.graphics.Paint import android.graphics.drawable.Drawable import android.text.format.DateUtils import android.util.AttributeSet import android.view.ContextThemeWrapper import android.view.MotionEvent import android.view.View import android.view.ViewGroup import androidx.annotation.AttrRes import androidx.annotation.StyleRes import androidx.core.content.ContextCompat import androidx.core.content.withStyledAttributes import androidx.core.view.children import androidx.core.view.get import com.jonaswanke.calendar.RangeView.Companion.showAsAllDay import com.jonaswanke.calendar.utils.DAY_IN_HOURS import com.jonaswanke.calendar.utils.Day import com.jonaswanke.calendar.utils.timeOfDay import com.jonaswanke.calendar.utils.toCalendar import kotlinx.coroutines.*

import java.util.* import kotlin.math.max import kotlin.math.min import kotlin.properties.Delegates

/**

=======

I changed it to Georgian calendar but still not working. Can you please help me on this

ahashimoto commented 3 years ago

Hi,

We also changed utils/Day.kt, utils/Utils.kt and utils/Week.kt as well. Pls see attached.

calendar.zip

jigar1211 commented 3 years ago

Hi

Do you have any videa how to display recurring events in calendar like I want add event every day or evry month then how can I do it? If you can help me then it will be good for mr

ahashimoto commented 3 years ago

Sorry, I don't have any idea.

jigar1211 commented 3 years ago

Hi,

In my app gesture of pinch in pinch out work perfectly without events. When I add an event on daily or weekly view events are not pinch in and pinch out according to the hour's view. Do you have any solution or idea regarding this? Thanks in advance for your help.