I want to show year component only in a NSDatePicker.
I tried set/add NSDateFormatter to NSDatePicker, but with no luck. (By dragging a NSDateFormatter to NSDatePicker in nib)
Is there any way to achieve this without subclassing NSDatePicker or NSTextField? Thank you!
-[NSDatePicker setDatePickerElements:]
can no longer be tricked into showing year only.A year-only NSDatePicker can be obtained by configuring a year-month picker and subclassing NSDatePickerCell to prevent it from creating the month and separator fields:
Please file bug reports with Apple to request a year-only variant of NSDatePicker. I also requested a week-of-year picker.