I am geetting very strange behavior on UIDatePicker.
//set min and max
NSDate *minDate = [self myMethodForDateFromString:@"1000-01-01 00:00:00"];
NSDate *maxDate = [self myMethodForDateFromString:@"9999-12-31 23:59:59"];
datepicker.minimumDate = minDate;
datepicker.maximumDate = maxDate;
NSLog("minDate:%@, maxDate:%@", minDate, maxDate);
//minDate:1000-01-01 00:00:00 +0900, maxDate:9999-12-31 23:59:00 +0900
I flic and flic …, for DatePicker indicates 1000-01-01.
At last I set “1000-01”.
Then day picker(1 .. 5) on DatePicker was disabled.
And I can not select 1000-01-01. (I can select 1000-01-06 as 1000-01-01)
Is this the spec of framework?
I can’t find what I have done wrong. I hope somebody else has come across similar problem and can help me resolve this.
The documentation states that NSDate represents dates with the transition from the Julian to Gregorian calendars in October 1582. It sounds like your UIDatePicker is picking dates using the proleptic Gregorian calendar instead of matching this transition.