Skip to content

Commit

Permalink
Fixes sample after merge broke API
Browse files Browse the repository at this point in the history
  • Loading branch information
escoz committed Apr 8, 2013
1 parent dd04f03 commit bb292a5
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions sample/SampleDataBuilder.m
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ + (QElement *)createSampleControls {
[controls addElement:autoElement];

[controls addElement:boolElement];
QDateTimeInlineElement *dateElement = [[QDateTimeInlineElement alloc] initWithTitle:@"DateTime" date:[NSDate date]];
QDateTimeInlineElement *dateElement = [[QDateTimeInlineElement alloc] initWithTitle:@"DateTime" date:[NSDate date] andMode:UIDatePickerModeDateAndTime];
dateElement.key = @"date1";
[controls addElement:dateElement];

Expand Down Expand Up @@ -574,19 +574,17 @@ + (QRootElement *)createDateTimeRoot {
QSection *section = [[QSection alloc] init];
section.title = @"Inline editing";

QDateTimeInlineElement *el2 = [[QDateTimeInlineElement alloc] initWithTitle:@"Today" date:[NSDate date]];
QDateTimeInlineElement *el2 = [[QDateTimeInlineElement alloc] initWithTitle:@"Today" date:[NSDate date] andMode:UIDatePickerModeDate];
[section addElement:el2];

QDateTimeInlineElement *el3 = [[QDateTimeInlineElement alloc] initWithTitle:@"Date only" date:[NSDate date]];
el3.mode = UIDatePickerModeDate;
QDateTimeInlineElement *el3 = [[QDateTimeInlineElement alloc] initWithTitle:@"Date only" date:[NSDate date] andMode:UIDatePickerModeDate];
[section addElement:el3];

QDateTimeInlineElement *el4 = [[QDateTimeInlineElement alloc] initWithTitle:@"Time only" date:[NSDate date]];
el4.mode = UIDatePickerModeTime;
QDateTimeInlineElement *el4 = [[QDateTimeInlineElement alloc] initWithTitle:@"Time only" date:[NSDate date] andMode:UIDatePickerModeTime];
[section addElement:el4];

QDateTimeInlineElement *elDiffTime = [[QDateTimeInlineElement alloc] initWithTitle:@"Different date" date:
[NSDate dateWithTimeIntervalSinceNow:-36000]];
[NSDate dateWithTimeIntervalSinceNow:-36000] andMode:UIDatePickerModeDate];
[section addElement:elDiffTime];

QSection *section2 = [[QSection alloc] init];
Expand Down

0 comments on commit bb292a5

Please sign in to comment.