Closed parsamlm closed 3 years ago
could you please help me with this if it's possible? thank you
Hi Parsa, Sorry for delay. Yes, there is no problem to set a list of days as pre-selected. The point is that you should set it before showing the fragment. Unfortunately, I can't infer what was the problem with it in your code. (because of accessing via binding) Please share more related code. Thanks.
Do you mean that I should set it in onCreateView?
and
What method I should use to set a list of days as pre-selected?(is it setPickedMultipleDaysList( )
?)
thank you.
Problem Solved, Thanks.
Hello again Amin, I wanna know if it possible to set multiple pre-selected dates in PrimeCalendar or not. (this is my code which I try to do this)
List<PrimeCalendar> calendarList = new ArrayList<>();
if (taskList.size() > 0){
for (int i = 0; i < taskList.size(); i++){
int year = Integer.parseInt(taskList.get(i).getDate().substring(0, 4));
int month = Integer.parseInt(taskList.get(i).getDate().replaceAll("-", "/").substring(5, 7));
int day = Integer.parseInt(taskList.get(i).getDate().replaceAll("-", "/").substring(8, 10));
PrimeCalendar primeCalendar = new CivilCalendar();
primeCalendar.setDate(day);
month = month - 1;
primeCalendar.setMonth(month);
primeCalendar.setYear(year);
calendarList.add(primeCalendar);
}
}
binding.calendarCalendarFragment.setPickedMultipleDaysList(calendarList);