0

Right now I am just using a NSTextCell with a NSDateFormatter, I just wanted to know if this was possible, perhaps by using the .

Thanks in advance!

sevan1028
  • 73
  • 1
  • 7

1 Answers1

0

not without making a bunch of hacking... Apple doesn't provide the date picker cell for the table for some reason. I would keep the date formatter or make it so when the cell is clicked, it pops open the graphical date picker.

I created a menu in the xib file, set the outlet for the cell's menu property to the menu, created a subclass of nsdatepicker, overrode the mouseDown:, and made it display the menu when clicked.

joels
  • 7,249
  • 11
  • 53
  • 94
  • One solution is to override the NSTableView, in the mouseDown method, check to see what row and col was clicked, if it's your target, display a Menu. In that menu, it has one menuItem and it's outlet is to an NSDatePicker. When showing the menu, set the date of the datePicker. In IB set the action of your datePicker to your save method. – joels Aug 31 '11 at 15:32