             }
         }
         components = calendar.dateComponents([.year, .month, .day, .hour, .minute], from: selectedDate)
+        contentView.isHidden = false
         
         // animate to show contentView
         UIView.animate(withDuration: 0.3, delay: 0, usingSpringWithDamping: 0.8, initialSpringVelocity: 0.4, options: .curveEaseIn, animations: {
             self.contentView.frame = CGRect(x: 0,
-                                            y: self.frame.height - contentHeight,
+                                            y: self.frame.height - self.contentHeight,
                                             width: self.frame.width,
-                                            height: contentHeight)
+                                            height: self.contentHeight)
         }, completion: nil)
     }
     

    public var todayButtonTitle = "Today" {
        didSet {
            todayButton.setTitle(todayButtonTitle, for: .normal)
        }
    }
    public var doneButtonTitle = "DONE" {

    
    public var daysBackgroundColor = UIColor(red: 239.0/255.0, green: 243.0/255.0, blue: 244.0/255.0, alpha: 1)
    
    var didLayoutAtOnce = false
    public override func layoutSubviews() {
        super.layoutSubviews()
        // For the first time view will be layouted manually before show
        // For next times we need relayout it because of screen rotation etc.
        if !didLayoutAtOnce {
            didLayoutAtOnce = true
        } else {
            self.configureView()
        }
    }
    
    public var selectedDate = Date() {
        didSet {
            resetDateTitle()
