         return rx
     }()
     
-    private let maxCreditCardAge = 21
-    
     private var month: Int?
     private var year: Int?
     

    public var selectedYear: Int? { return year }
    
    public override var isValid: Bool {
        let range = NSRange(location: 0, length: (text ?? "").characters.count)
        let options = NSMatchingOptions(rawValue: 0)
        return expirationRx.numberOfMatchesInString(text ?? "", options: options, range: range) > 0
        // TODO: Check year>now.year && month > now.month
    }
    
    override public init() {

        placeholder = "MM/YY"
        let expiryDatePicker = CardExpiryDatePicker() // TODO: Use normal picker delegate.
        expiryDatePicker.onDateSelected = { [weak self] (month: Int, year: Int) in
            self?.text = String(format: "%02d/%d", month, year-2000)
            self?.month = month
            self?.year = year
        }
        inputView = expiryDatePicker
    }
