         selectRow(selectedYear!, inComponent: 2, animated: false)
     }
     
-    private func getNumberOfComponentsForDatePickerType(type : VJDatePickerType?)->Int{
+    private func getNumberOfComponentsForDatePickerType(var type : VJDatePickerType?)->Int{
         
-        var pickerType : VJDatePickerType = .Default
-        if let _ = type{
-            pickerType = type!
+        if type == nil{
+            type = .Default
         }
-        switch pickerType{
+        switch type!{
         case .Default:
             return 3
         case .MonthDay,.YearMonth:

        }
    }
    
}

            return ""
        }
    }

    func pickerView(pickerView: UIPickerView, didSelectRow row: Int, inComponent component: Int) {
        
    }
    
    func pickerView(pickerView: UIPickerView, numberOfRowsInComponent component: Int) -> Int {
        return rows[component]
    }
    
    func numberOfComponentsInPickerView(pickerView: UIPickerView) -> Int {
