 import Foundation
 import UIKit
 
+/**
+*  Inline/Expanding date picker for table views.
+*/
 public class DatePickerCell: UITableViewCell {
     
+    /**
+    *  UIView subclass. Used as a subview in UITableViewCells. Does not change color when the UITableViewCell is selected.
+    */
     class DVColorLockView:UIView {
         
         var lockedBackgroundColor:UIColor {

            rightLabel.text = DatePickerCell.Stored.dateFormatter.stringFromDate(date)
        }
    }
    public var timeStyle = NSDateFormatterStyle.ShortStyle
    public var dateStyle = NSDateFormatterStyle.MediumStyle
    
    public var leftLabel = UILabel()
    public var rightLabel = UILabel()
    public var rightLabelTextColor = UIColor(hue: 0.639, saturation: 0.041, brightness: 0.576, alpha: 1.0) //Color of normal detail label.
    
    var seperator = DVColorLockView()
    
    var datePickerContainer = UIView()
    public var datePicker: UIDatePicker = UIDatePicker()
    
    public var expanded = false
    var unexpandedHeight = CGFloat(44)
    
    override public init(style: UITableViewCellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
                

        static var dateFormatter = NSDateFormatter()
    }
    
    /// The selected date, set to current date/time on initialization.
    public var date:NSDate = NSDate() {
        didSet {
            datePicker.date = date
