   open var autoScrollToFirstEvent = false
 
   let dayHeaderView = DayHeaderView()
-  let timelinePager = PagingScrollView<TimelineContainer>()
-  var timelineSynchronizer: ScrollSynchronizer?
+  let timelinePagerView = TimelinePagerView()
 
   var currentDate = Date().dateOnly()
 

  }
}

extension DayView: PagingScrollViewDelegate {
  func updateViewAtIndex(_ index: Int) {
    let timeline = timelinePager.reusableViews[index].timeline
    let amount = index > 1 ? 1 : -1
    timeline?.date = currentDate.add(TimeChunk(seconds: 0,
                                               minutes: 0,
                                               hours: 0,
                                               days: amount,
                                               weeks: 0,
                                               months: 0,
                                               years: 0))
    updateTimeline(timeline!)
  }

  func scrollviewDidScrollToViewAtIndex(_ index: Int) {
    let nextDate = timelinePager.reusableViews[index].timeline.date
    delegate?.dayView(dayView: self, willMoveTo: nextDate)
    currentDate = nextDate
    dayHeaderView.selectDate(currentDate)
    if autoScrollToFirstEvent {
      scrollToFirstEvent()
    }
    delegate?.dayView(dayView: self, didMoveTo: currentDate)
  }

  func scrollToFirstEvent() {
    let index = Int(timelinePager.currentScrollViewPage)
    timelinePager.reusableViews[index].scrollToFirstEvent()
  }
}


  }

  public var timelineScrollOffset: CGPoint {
    return timelinePagerView.timelineScrollOffset
  }

  static let headerVisibleHeight: CGFloat = 88
