Open KORuL opened 5 years ago
I clone this repo!
calendarHorizontal = HorizontalCalendar.Builder(this, R.id.calendarViewHorizontal)
.range(startDate, endDate)
.datesNumberOnScreen(8) // Number of Dates cells shown on screen (Recommended 5)
.configure()
.formatTopText("EEE") // default to "MMM".
.formatMiddleText("dd") // default to "dd".
.formatBottomText("MMM''yy") // default to "EEE".
.sizeBottomText(10f)
.sizeTopText(14f)
.sizeMiddleText(21f)
.textColor(
ContextCompat.getColor(applicationContext, R.color.new_black_unsel),
ContextCompat.getColor(applicationContext, R.color.new_black_sel)
) // Text color for none selected Dates, Text color for selected Date.
.selectedDateBackground(getResourses().getDrawable(R.drawable.gradient_selected_calendar)) // Background Drawable of the selected date cell.
.selectorColor(
ContextCompat.getColor(
applicationContext,
R.color.new_calendar_selector_color
)
)
.end()
.defaultSelectedDate(Calendar.getInstance())
.build()
if datesNumberOnScreen(8)
- selecting incorrect date
datesNumberOnScreen
should be an odd number since the calendar will try to center the date on screen. Even numbers are not supported atm.
Ok, I use datesNumberOnScreen(7)
And everyone chooses the current date, however, the previous day is chosen in Kiev
@KORuL @Mulham-Raee Did you guys find any solution for this? when i am giving datesNumberOnScreen(7) // Number of Dates cells shown on screen its not working for selection on current date.
Only working for when i am giving dateNumberOnScreen(5).. Please help..
Expected Behavior / Goal
It almost always works fine, but some users receive a complaint about switching the calendar a day ago from the current date.
Actual Behavior
Steps to Reproduce the Problem (sample code if possible)
Specifications