title: JTAppleCalendar delegates not working for Swift
body: <p>I have a calendar on my app using <code>JTAppleCalendar 7.0</code>.</p>
  
  <p>However the delegates for the same are not working. Please refer to the screenshot of my requirement. </p>
  
  <p><img src="https://i.stack.imgur.com/zHHxE.png" alt=""></p>
  
  <p>Somebody kindly share with me the sample delegate functions.</p>
  
  <p>Below is the screenshot of the outlets to the calendar.</p>
  
  <p><a href="https://i.stack.imgur.com/5HTWY.png" rel="nofollow noreferrer">Outlets to the calendar</a></p>
  
  <p>Below is the entire code for the Calendar.</p>
  
  <pre><code>import UIKit
  import JTAppleCalendar
  
  class CalendarViewController: UIViewController, JTAppleCalendarViewDelegate, JTAppleCalendarViewDataSource  {
  
  
  
      @IBOutlet weak var calendarView: JTAppleCalendarView!
      let formatter = DateFormatter()
  
      override func viewDidLoad() {
          super.viewDidLoad()
  
      }
  
      func configureCalendar(_ calendar: JTAppleCalendarView) -&gt; ConfigurationParameters {
  
          formatter.dateFormat  = "yyyy MM dd"
          formatter.timeZone = Calendar.current.timeZone
          formatter.locale = Calendar.current.locale
  
          let startDate = formatter.date(from: "2018 08 10")!
          let endDate = formatter.date(from: "2018 10 10")!
  
          let parameters = ConfigurationParameters(startDate: startDate, endDate: endDate)
          return parameters
  
      }
  
      func calendar(_ calendar: JTAppleCalendarView, willDisplay cell: JTAppleCell, forItemAt date: Date, cellState: CellState, indexPath: IndexPath) {
              let dateCell = cell as! DateCell
              dateCell.dateLabel.text = cellState.text
      }
  
  
      func calendar(_ calendar: JTAppleCalendarView, cellForItemAt date: Date, cellState: CellState, indexPath: IndexPath) -&gt; JTAppleCell {
  
          if let cell = calendarView.dequeueReusableJTAppleCell(withReuseIdentifier: "dateCell", for: indexPath) as? DateCell {
              cell.dateLabel.text = cellState.text
              cell.configure(date: cellState.text)
              return cell
          }
          return DateCell()
      }
  
  
      func calendar(_ calendar: JTAppleCalendarView, didSelectDate date: Date, cell: JTAppleCell, cellState: CellState) {
          guard let validCell = cell as? DateCell else { return }
          validCell.contentView.backgroundColor = UIColor.black
  
      }
  
  
      func calendar(_ calendar: JTAppleCalendarView, didDeselectDate date: Date, cell: JTAppleCell, cellState: CellState) {
  
      }
  
  }
  </code></pre>