         }
     }
     
+    func prepareRowsForVJDatePickerType(type : VJDatePickerType){
+        switch type{
+        case .Default:
+            rows = [Int(INT16_MAX),Int(INT16_MAX),years.count]
+            break
+        case .DayOnly:
+            rows = [Int(INT16_MAX)]
+            break
+        case .MonthOnly:
+            rows = [Int(INT16_MAX)]
+            break
+        case .YearOnly:
+            rows = [years.count]
+            break
+        case .YearMonth:
+            rows = [years.count,Int(INT16_MAX)]
+            break
+        case .MonthDay:
+            rows = [Int(INT16_MAX),Int(INT16_MAX)]
+            break
+        }
+    }
+    
 }

            return ""
        }
    }
    
    func pickerView(pickerView: UIPickerView, didSelectRow row: Int, inComponent component: Int) {
        
    }
    
    func pickerView(pickerView: UIPickerView, numberOfRowsInComponent component: Int) -> Int {
        
        // For giving infinite scrolling
        switch component{
        case 0:
            return Int(INT16_MAX)
        case 1:
            return Int(INT16_MAX)
        case 2:
            return years.count
        default:
            return 0
        }
    }
    
    func numberOfComponentsInPickerView(pickerView: UIPickerView) -> Int {

            datePickerType = .Default
        }
        showsSelectionIndicator = true
        prepareRowsForVJDatePickerType(datePickerType)
        selectInitialValuesForDatePickerType(datePickerType)
    }
    
