我在UILabel中有一个日期(比如‘2010年12月14日)。我想将这个日期设置为我的UIDatepicker的最小日期。我该怎么做呢?请回复?
谢谢Nishant
发布于 2016-04-20 19:27:30
查看从当前日期到一个月的最短时间:
NSDate* currentTime = [NSDate date];
[datePicker setMinimumDate:[currentTime dateByAddingTimeInterval:43200]];//min time +12:00 for the current date
[datePicker setMaximumDate:[currentTime dateByAddingTimeInterval:2592000]]; // max day (+ 30 )https://stackoverflow.com/questions/4436645
复制相似问题