Question

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.

Was it helpful?

Solution 2

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.

OTHER TIPS

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top