"DatePicker" is a Cocoa sample application that demonstrates how to use NSDatePicker control on Mac OS X. NSDatePicker is a subclass of NSControl that provides for visually displaying and editing an NSDate instance. This control uses an NSDatePickerCell to implement much of the control’s functionality.
The supplied Xcode project was created using Xcode v4.3 or later running under Mac OS X 10.7.x or later.
About the Sample
DatePicker shows how to manipulate the behaviors of NSDatePicker in the following ways -
1. Changing the picker style.
2. Changing the picker font size.
3. Changing the background/text color as well as other appearance aspects.
4. Turning on and off the various date and time element flags.
5. Setting the minimum and maximum dates.
6. Overriding the set date as a delegate.
The sample also shows how to use the various date and time formats using the NSDateFormatter class.
Using the Sample
Simply build and run the sample using Xcode.
Changes from Previous Versions
1.0 - First release
1.1 - Upgraded to support 10.6, removed some compiler warnings, simplified UI, some code-reformatting.
1.2 - Upgraded to Xcode 4.3 and Mac OS X 10.7.
Copyright (C) 2006-2012, Apple Inc.