views:

237

answers:

2

How can I modify the NSDatePickerElementFlags for the NSDatePicker in row templates for NSDate properties returned by [NSPredicateRowEditorTemplate templatesWithAttributeKeyPaths:inEntityDescription:]? I would like the NSDatePicker to show hrs:minutes as well as the date.

Update I've added an answer below, gleaned from the cocoa-dev list.

+1  A: 

You can probably grok through the templateViews of the returned row templates to set this property.

Ben Stiglitz
+1  A: 

Per Peter Ammon, on cocoa-dev, and as Ben notes, the easiest way is to modify the date picker in -templateViews directly:

[[[template templateViews] objectAtIndex:2] setDatePickerElements:...]

According to Peter, the order of elements in -templateViews is guaranteed to be constant.

Barry Wark