1

I have a UIDatePicker which the first date it is set to (and beginning of the range) is 2013-08-30 00:00:00 +0000.

When selecting a date through an IBAction WITHOUT scrolling the UIDatePicker the date that comes up from datePicked = [datePicker date]; is todays date and not 2013-08-30 00:00:00 +0000.

Is there a way I can prevent this behaviour from occurring, I have tried last night for a few hours to fix it but I cannot find a way.

Josh Boothe
  • 1,413
  • 4
  • 25
  • 40

1 Answers1

4

set default date to DatePicker,

    NSDateFormatter *formater=[[NSDateFormatter alloc] init];
    [formater setDateFormat:@"yyyy-MM-dd"];
    NSDate *date= [formater dateFromString:@"2013-08-30"]
    [datePicker setDate:date];
Balu
  • 8,470
  • 2
  • 24
  • 41