JTAppleCalendar | Unofficial Apple iOS Swift Calendar View | Calendar library
kandi X-RAY | JTAppleCalendar Summary
kandi X-RAY | JTAppleCalendar Summary
A: However you want them to look.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of JTAppleCalendar
JTAppleCalendar Key Features
JTAppleCalendar Examples and Code Snippets
Community Discussions
Trending Discussions on JTAppleCalendar
QUESTION
I am working on one of my iOS application where I am needed to add the events on the date, I am trying to achieve the UI result like in bellow screenshot.
I've worked out most of area using FSCalendar, JTAppleCalendar etc but I meet most of requirements which I am looking for except the adding event label/string on date.
Added current status screenshot using FSCalendar Library. I can see only dots(ImageView) FSCalendar
is not allowing me to add the label/string on date.
Here is What I'm aiming to do.
Can anyone help me how can achieve this?
Thank you in advance.
...ANSWER
Answered 2020-May-26 at 08:46You can customize both of the libraries.I have done that before.There must be a .xib file for a UiCollectionView that is being used for the calendar.You can customize that Xib file and add label for the events. Just unlock the pod files and work on them.
QUESTION
hi newBiew in JTAppleCalendar. I have following this link for creating a Calendar base on JTAppleCalendar. https://www.youtube.com/watch?v=CQNotydm58s&index=6&list=PLpqJf39XekqyUG7dxcqGO0JNprryysv9Q
I could not figure how to get a date after user press the date on the Calendar.
Here the code:
in the didSelectDate. The date return is always one day behind??
This is what I wanted to achieve. When user tap on the date on the calendar, I want to get the date and use this date to request data from the server,
...ANSWER
Answered 2020-Feb-04 at 01:32the answer is found in this github issue. Never look at xcode console to see the correct date. The print command and also the XCode display for dates comes with its own formatting with might be different than your time zone. The date you see visually only "looks" incorrect because of that wrong formatting. To display dates correctly in iOS, always use a DateForamatter. The link i posted above explains it for you. This question exists in any iOS calendar library you use.
QUESTION
I'm using JTAppleCalendar to add a calendar to a view in my app. I had everything working but after I updated to 8.0 I can't link the controllers properly.
Here is the error I get
Assertion failed: Attemped to access calendar when Datasource/delegate is not set yet. Returning default value: file /Users/studio/Desktop/my_app/Pods/JTAppleCalendar/Sources/JTAppleCalendar/JTACVariables.swift, line 109 2019-09-23 00:51:42.437357+0300 Ways[4044:97207] Assertion failed: Attemped to access calendar when Datasource/delegate is not set yet. Returning default value: file /Users/studio/Desktop/my_app/Pods/JTAppleCalendar/Sources/JTAppleCalendar/JTACVariables.swift, line 109
Here is my controller
...ANSWER
Answered 2019-Sep-23 at 10:47I think you missed the migration guide. In there it tells you to rename your functions and gives you a list of functions to rename.
In your case of didSelect/didDeselect, it should be renamed to
QUESTION
I have a view controller that contains 2 collection views. So data source and delegate for the first calendar are in view controller extension. For the second i'm trying to make class that conforms data source and delegate protocols. And in ViewDidLoad
it gives me an error Cannot assign value of type 'ExpandableCalendarDataSource.Type' to type 'JTAppleCalendarViewDataSource?'
ANSWER
Answered 2019-Apr-20 at 19:44Just needed to make an object
QUESTION
I have a form in which the user will select days and then select a date from calendar view..
for example: the user will first select sun and mon .. then click on date button an so calendar view will be shown ..
I want the user just be able to select dates in days sun or mon .. i want to disable the other days and highlight them for example ..
what is the best way to do that?
i saw these two libraries:
https://cocoapods.org/pods/JTAppleCalendar
https://github.com/WenchaoD/FSCalendar
but didn't find anything that helps me do what i need using them..
what is the best way to do that?
...ANSWER
Answered 2018-May-01 at 04:58You have to consider Sunday as 1, Monday as 2, Tuesday as 3 and so on Saturday 7.
Define below globally
QUESTION
import UIKit
import JTAppleCalendar
class ViewController: UIViewController, JTAppleCalendarViewDelegate, JTAppleCalendarViewDataSource {
let formatter = DateFormatter()
override func viewDidLoad() {
super.viewDidLoad()
}
func calendar(_ calendar: JTAppleCalendarView, willDisplay cell: JTAppleCell, forItemAt date: Date, cellState: CellState, indexPath: IndexPath) {
let myCustomCell = cell as! JTCustomCell
sharedFunctionToConfigureCell(myCustomCell: myCustomCell, cellState: cellState, date: date)
}
func calendar(_ calendar: JTAppleCalendarView, cellForItemAt date: Date, cellState: CellState, indexPath: IndexPath) -> JTAppleCell {
let cell = calendar.dequeueReusableJTAppleCell(withReuseIdentifier: "JTCustom", for: indexPath) as! JTCustomCell
self.calendar(calendar, willDisplay: cell, forItemAt: date, cellState: cellState, indexPath: indexPath)
cell.lblDate.text = cellState.text
return cell
}
func configureCalendar(_ calendar: JTAppleCalendarView) -> ConfigurationParameters {
formatter.dateFormat = "yyyy MM dd"
formatter.timeZone = Calendar.current.timeZone
formatter.locale = Calendar.current.locale
let startDate = formatter.date(from: "2019 02 02 ")!
let endDate = formatter.date(from: "2020 01 01")!
let paramaters = ConfigurationParameters(startDate: startDate, endDate: endDate)
return paramaters
}
func sharedFunctionToConfigureCell(myCustomCell: JTCustomCell, cellState: CellState, date: Date) {
myCustomCell.lblDate.text = cellState.text
}
}
//ref: JTAppleCalenderLibray 7.1.6
...ANSWER
Answered 2019-Jan-12 at 10:37Make sure you collection class is set to JTAppleCalendarView in Identity Inspector and set the delegate ibCalendarDataSource and ibCalendarDelegate
If your calendar still appears blank make a reload in viewDidLayoutSubviews()
QUESTION
I am trying to implement JTAppleCalendar programmatically without storyboards, using a xib file for the cell. I have set the delegate and datasource, and implemented the required functions, but the cells are not showing. I can see that the collection view is set up and visible in the Viewcontroller(the blue square in image in link 2), and the configureCalendar() and cellForItemAt() are called, but still no data is shown.
What am I missing?
...ANSWER
Answered 2018-Aug-27 at 02:49JTAppleCalendarView
's super class is UICollectionView
and it uses UICollectionViewFlowLayout
to layout the items.JTAppleCalendarView
provides CellSize
to configure the item size and you also can use UICollectionViewFlowLayout
to configure Min Spacing
.
I guess you were using xib to Custom Cell, so you have to use register(_ nib: UINib?, forCellWithReuseIdentifier identifier: String)
to register the Cell.Finally, don't forget to add constraints for the dayLabel.
calendarView's Cell Size is 40, width is 280(7 columns) and height is 240(six rows), Min Spacing for cells and lines are 0.
QUESTION
I’m trying to create a habit tracker using CoreData
and JTAppleCalendar
.
I want the user to be able to create a habit and then when completed on a set date it saves it for the day. The interface would show a calendar which the user can set habits for certain dates.
Struggling to work out how to implement the model with the calendar to get this working.
How should I construct the model for CoreData
?
ANSWER
Answered 2018-Aug-01 at 05:40Here is one way to implement this.
- Make a model for Habit with attributes like name of the habit, start date and end date.
- Create a model for ReminderObjects with attributes like fireDate, completedStatus etc.
- Now create a relationship from Habit to ReminderObjects as one-to-many.
When the user creates an object for Habit, create the corresponding ReminderObjects, for that Habit, for all the dates between startDate and endDate as the fireDate of the ReminderObjects.
Now when displaying in the JTAppleCalendarView
- Filter the ReminderObjects for the Habit you want to display
- Filter the ReminderObjects from the fireDate when the user selects a date from the JTAppleCalendarView.
QUESTION
My question is related to this one: How to change height Constraint of UIView in UitableviewCell when using UITableViewAutomaticDimension
The solution there does not seem to be working for me.
In the image above i have a simple cell. On tap of cell, i want to change the constraint of the redView to be larger. This should then automatically change the height of the cell.
I already have the height constraint of the cell set to an @IBOutlet and i think i am correctly changing the size of the cell, but it is not working.
Here is my sample app that is not working. Any help? SampleApp - for Xcode 9.3
...ANSWER
Answered 2018-Jul-13 at 17:03Calling the below will recalculate the heights.
QUESTION
I worked on UICollectionView and I don't solve some problem. Is there any way to reload UICollectionView with scrolling - gesture on it.
When I scroll the right side or left side , I want to change the active week and refresh collectionview (day's hours events)."The Calendar is JTAppleCalendar"
I search some articles but i didnt get any answer. Some of them use the PanGestureRecogniser but i dont implement it also i dont know this is the correct way. Plase share your power
...ANSWER
Answered 2018-May-11 at 06:50Firstly Add the collectionView Scrolling direction to Vertical either programmatically in ViewDidLoad or in Interface Builder,& add swipe Right and Left gesture to perform action like reload data when swipe.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install JTAppleCalendar
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page