title: Selecting Multiple Dates in Calendar tvOS
body: <p>I managed to convert this iOS calendar component (<a href="https://github.com/lancy98/Calendar" rel="nofollow">https://github.com/lancy98/Calendar</a>) to my tvOS application. Now I want to select more than one dates to show some report for selected dates. How can I do that ? Thanks</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>class CalendarViewController: UIViewController, CalendarViewDelegate {
      
  
  
      
      @IBOutlet var placeholderView: UIView!
      override func viewDidLoad() {
          super.viewDidLoad()
          
          // todays date.
          let date = NSDate()
          
          // create an instance of calendar view with
          // base date (Calendar shows 12 months range from current base date)
          // selected date (marked dated in the calendar)
          let calendarView = CalendarView.instance(date, selectedDate: date)
          calendarView.delegate = self
          calendarView.translatesAutoresizingMaskIntoConstraints = false
          placeholderView.addSubview(calendarView)
          
          // Constraints for calendar view - Fill the parent view.
          placeholderView.addConstraints(NSLayoutConstraint.constraintsWithVisualFormat("H:|[calendarView]|", options: NSLayoutFormatOptions(rawValue: 0), metrics: nil, views: ["calendarView": calendarView]))
          placeholderView.addConstraints(NSLayoutConstraint.constraintsWithVisualFormat("V:|[calendarView]|", options: NSLayoutFormatOptions(rawValue: 0), metrics: nil, views: ["calendarView": calendarView]))
      }
      
      func didSelectDate(date: NSDate) {
          print("\(date.year)-\(date.month)-\(date.day)")
      }
  }</code></pre>
  </div>
  </div>
  </p>