Set Years to maximum in UIDatePicker

2019-08-29 11:20发布

I am using a custom uidatepicker for my app from

https://github.com/christopherney/FlatDatePicker

The Problem is, The minimum year is 1900 (Which is Fine) but the Maximum year is 2013 (Which is not fine). How could I change this so the Maximum year is infinite or even like the year 2200 or something?

Thanks in Advance!

2条回答
一纸荒年 Trace。
2楼-- · 2019-08-29 11:45

Try:

[datePicker setMaximumDate:yourmaxDate];
查看更多
ゆ 、 Hurt°
3楼-- · 2019-08-29 11:46

Simply set the maximumDate property of your date picker:

datePicker.maximumDate = [NSDate distantFuture];
查看更多
登录 后发表回答