 
 import UIKit
 
-let screenWidth = UIScreen.main.bounds.size.width
-let screenHeight = UIScreen.main.bounds.size.height
-let contentHeight: CGFloat = 310
 
 @objc public class DateTimePicker: UIView {
     
+    let contentHeight: CGFloat = 310
+    
     // public vars
     public var backgroundViewColor = UIColor.clear {
         didSet {

    
    
    @objc open class func show(selected: Date? = nil, minimumDate: Date? = nil, maximumDate: Date? = nil) -> DateTimePicker {
        let dateTimePicker = DateTimePicker(frame: CGRect(x: 0,
                                                          y: 0,
                                                          width: screenWidth,
                                                          height: screenHeight))
        dateTimePicker.selectedDate = selected ?? Date()
        dateTimePicker.minimumDate = minimumDate ?? Date(timeIntervalSinceNow: -3600 * 24 * 365 * 20)
        dateTimePicker.maximumDate = maximumDate ?? Date(timeIntervalSinceNow: 3600 * 24 * 365 * 20)

            self.contentView.frame = CGRect(x: 0,
                                            y: self.frame.height,
                                            width: self.frame.width,
                                            height: self.contentHeight)
        }) { (completed) in
            self.completionHandler?(self.selectedDate)
            self.removeFromSuperview()
