PersianDatePicker written in Swift
- iOS 9.0+
- Xcode 8.1+
- Swift 3.0+
you can use in cocoapods
pod 'PersianDatePicker'
you can use in the storyboard, you add a UIView in your ViewController and inherit from [ PersianDatePickerView ]
you can use pickerStyle for two types .
persianDatePicker.pickerStyle = .short
for set Font :
persianDatePicker.font = UIFont(name: "IRANSansMobileFaNum-Light", size: 18)
It's very simple.
import PersianDatePicker
@IBOutlet weak var txtDate: UITextField!
let persianDatePicker = PersianDatePickerView(frame: CGRect(x: 0, y: 0, width: 200, height: 200))
txtDate.inputView = persianDatePicker
persianDatePicker.onChange = { (year, month, day) in
self.txtDate.text = "\(year)/\(month)/\(day)"
}
PersianDatePicker is available under the MIT license. See the LICENSE file for more information.