Comments (7)
Hello @BhavinBhadani!
- calendar style settings
style.month.scrollDirection = .horizontal
style.month.isPagingEnabled = true
style.month.autoSelectionDateWhenScrolling = true
- You can create your own custom cell to monthView (2, 3, 4)
from kvkcalendar.
@kvyatkovskys Thanks for the reply. I am trying to use xib for the collection view cell like below but it isn't working and crashed when trying to get properties from cell.
if type == .month {
(view as? UICollectionView)?.register(TaskEventDateCell.self,
forCellWithReuseIdentifier: "TaskEventDateCell")
let cell = (view as? UICollectionView)?.kvkDequeueCell(indexPath: indexPath) { (cell: TaskEventDateCell) in
// configure the cell
if let day = parameter.date?.kvkDay {
cell.dateLabel.text = "\(day)"
}
print("Date: \(parameter.date?.kvkDay)")
}
return cell
}
Also, is there any delegate to know which month it is when we changes a month?
from kvkcalendar.
@kvyatkovskys Thanks for the reply. I am trying to use xib for the collection view cell like below but it isn't working and crashed when trying to get properties from cell.
if type == .month { (view as? UICollectionView)?.register(TaskEventDateCell.self, forCellWithReuseIdentifier: "TaskEventDateCell") let cell = (view as? UICollectionView)?.kvkDequeueCell(indexPath: indexPath) { (cell: TaskEventDateCell) in // configure the cell if let day = parameter.date?.kvkDay { cell.dateLabel.text = "\(day)" } print("Date: \(parameter.date?.kvkDay)") } return cell }
Also, is there any delegate to know which month it is when we changes a month?
- just subscribe on this
func willSelectDate(_ date: Date, type: CalendarType)
- can you provide crash log, pls? I'll try to investigate...
from kvkcalendar.
@kvyatkovskys Thanks again. let me send you view hierarchy for better understanding because I got a crash for outlets which already attached. Double checked few times and even used a new cell xib as well. In view hierarchy I don't even get content view.
and here is how TaskEventDateCell
looks like
from kvkcalendar.
@kvyatkovskys Thanks again. let me send you view hierarchy for better understanding because I got a crash for outlets which already attached. Double checked few times and even used a new cell xib as well. In view hierarchy I don't even get content view.
and here is how
TaskEventDateCell
looks like
Hmm, will try to reproduce. Can you send the crash log, pls?
from kvkcalendar.
@kvyatkovskys Regarding crash log, it just says that property outlet is nil as we don't have anything in hierarchy as you can see in above pic.
Fatal error: Unexpectedly found nil while implicitly unwrapping an Optional value
As you can see outlets are properly attached as well
And one more question, how we can hide inbound and outbound dates from custom cell? As you can see in a below video, the outbound dates to be shown when we scroll a little bit. And one more issue is when we change calendar cell size based on weeks in a month, whole layout just shattered.
Screen.Recording.2022-12-08.at.5.19.09.PM.mov
from kvkcalendar.
I can't reproduce the issue with dates on month view... about the xib file, try to create a cell from code
from kvkcalendar.
Related Issues (20)
- Problem with displaying a single event in several days (Month View)
- willSelect is not working properly
- Incorrect title color for month name in month view
- Missing vertical lines at week view HOT 9
- Lazy Loading of agenda view HOT 17
- didChangeEvent returns wrong date (number of the month) when drag event at the junction of the months HOT 1
- didChangeEvent returns wrong (number of month) when drag event at the junction of the months HOT 1
- Trying to add overlay in SwiftUI HOT 1
- what is year in KVKCalendarView init? HOT 1
- need to show calendar in Ipad with iphone screen size HOT 7
- How to get next and previous in month view HOT 5
- date selection of agenda view section header can be disabled HOT 3
- Getting Errors While Running the Project After Pod install HOT 7
- Crash in month view when the device orientation is changed HOT 1
- Crash in year view when the view height is small HOT 2
- When working in SwiftUI, I am having trouble with event creation. I longpress on the screen to create an event, but when I let go, the event disappears. HOT 5
- Bitrise build swift compiler error HOT 3
- Unable to capture the view hierarchy
- The event preview size will become the size of the last tapped event
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kvkcalendar.