   }
 
   var eventViews = [EventView]()
-  public var layoutAttributes = [EventLayoutAttributes]() {
-    didSet {
+  public private(set) var regularLayoutAttributes = [EventLayoutAttributes]()
+  public private(set) var allDayLayoutAttributes = [EventLayoutAttributes]()
+  
+  public var layoutAttributes: [EventLayoutAttributes] {
+    set {
+      
+      // update layout attributes by separating allday from non all day events
+      allDayLayoutAttributes.removeAll()
+      regularLayoutAttributes.removeAll()
+      for anEventLayoutAttribute in newValue {
+        let eventDescriptor = anEventLayoutAttribute.descriptor
+        if eventDescriptor.isAllDay {
+          allDayLayoutAttributes.append(anEventLayoutAttribute)
+        } else {
+          regularLayoutAttributes.append(anEventLayoutAttribute)
+        }
+      }
+      
       recalculateEventLayout()
       prepareEventViews()
       setNeedsLayout()
     }
+    get {
+      return allDayLayoutAttributes + regularLayoutAttributes
+    }
   }
   var pool = ReusePool<EventView>()
 
   var firstEventYPosition: CGFloat? {
-    return layoutAttributes.sorted{$0.frame.origin.y < $1.frame.origin.y}
+    return regularLayoutAttributes.sorted{$0.frame.origin.y < $1.frame.origin.y}
       .first?.frame.origin.y
   }
 

  }

  func recalculateEventLayout() {
    let sortedEvents = layoutAttributes.sorted { (attr1, attr2) -> Bool in
      let start1 = attr1.descriptor.startDate
      let start2 = attr2.descriptor.startDate
      return start1.isEarlier(than: start2)


  func layoutEvents() {
    if eventViews.isEmpty {return}
    
    for (idx, attributes) in regularLayoutAttributes.enumerated() {
      let descriptor = attributes.descriptor
      let eventView = eventViews[idx]
      eventView.frame = attributes.frame
