YACalendar
YACalendar copied to clipboard
How to move down daysStackView under Month title
How to move down daysStackView under Month title and there should be 2 button to move to next and previous months
Hi @asadqazi ! To implement this you need:
- Set
calendarView.config.month.showTitle = false
- Add your custom view with a label for month title and next/previous buttons.
In order to know the current month, you can by implementing CalendarViewDelegate with func didUpdateDisplayedDate(_ date: Date)
method
To scroll next/previous month use func scroll(to date: Date)
method
I disabled the month and days view but it leaves a blank space at top. How to remove that blank space? And also please tell me how to increase the size of selection circles?

@asadqazi update pod to 0.0.2
version
I downloaded the code yesterday. I am customizing it according to my requirments. But now just stuck at selection size and extra top space
And func scroll(to date: Date)
not working when going to previous month on button click
@asadqazi I have fixed extra top size today. What do you mean by selection size? I will check scroll(to date: Date)
@asadqazi I just checked and scroll works fine
calendarView.currentDate = Calendar.current.date(byAdding: .month, value: -1, to: calendarView.currentDate)!
calendarView.scroll(to: calendarView.currentDate)
Maybe you have another case?
The day selection, range color is static. I think it can ne configurable. Like for day config
I tried to inherit the day view class and it gives me error because of a non open class. Searched SO and found https://stackoverflow.com/a/38979479/3366100

I locally changed the classes to open but another issue that from stroryboard the CalendarView refrence is nil while running the app
Please create a project and use your lib as pod, and see if problem occurs on your side. Because currently you locally added it as framework
@asadqazi I have fixed the issues. Please check version 0.0.3
There should also be an option so that user cannot select futures dates from today.
I set the endDay
to Date()
but it creates an issue.
@asadqazi Did you try func disableDays(with dates: [Date])
method?
Yes but it take an array of dates and I want to disable all the remaining future days from today.
According to this method I will have to get all the future days Date
objects and will use them.