[https://www.linkedin.com/in/ucargiray/]
This is a custom calendar view written in SwiftUI. No third party libraries used in order to create this. You can download and change the variable's values in order to achieve the view you want.
- App gets the users current date and shows the month that user is on. If user opens calendar view at March, view starts with March month and lists all the days of March.
- When user clicks on the either left nor right arrow, month and days changes.
- (Optional)There is a limitation for user to change months on calendar. Default value is 2 right now but change this limitation with changing the variable called "monthDifferenceLimit".
- User's current day is shown on the calendar as a gray circle behind it.
- When user clicks on numbers on the calendar, view updates itself and puts a purple circle behind it to notify the user.
- Inside "Date+Weekday.swift" file, some functionallity added for Date and String struct.
- "CustomCalendarViewModel.swift" file has the functions for calculating the day's name.
- "CustomCalendarDayView.swift" file is the header view which has the day names right above CalendarView.
- "CustomCalenderView.swift" is the file of whole Calender View.
User chooses different day | User's current day is shown | User reaches bottom limit | User reaches upper limit |
---|---|---|---|
Distributed under the MIT License. See LICENSE
for more information.
Ahmet Giray Uçar - giray.dev
Project Link: https://github.com/ucargiray/Custom-Calendar