| Inherits from | |
| Conforms to | |
| Framework | /System/Library/Frameworks/AppKit.framework |
| Availability | Available in Mac OS X v10.4 and later. |
| Declared in | NSDatePicker.h |
| Related sample code |
NSDatePicker is a subclass of NSControl that provides a user interface for displaying and editing an NSDate object.
NSDatePicker uses an NSDatePickerCell to implement much of the control’s functionality. NSDatePicker provides cover methods for most of NSDatePickerCell methods, which invoke the corresponding cell method.
– isBezeled
– setBezeled:
– isBordered
– setBordered:
– backgroundColor
– setBackgroundColor:
– drawsBackground
– setDrawsBackground:
– textColor
– setTextColor:
– datePickerStyle
– setDatePickerStyle:
– delegate
– setDelegate:
– datePickerElements
– setDatePickerElements:
– calendar
– setCalendar:
– locale
– setLocale:
– datePickerMode
– setDatePickerMode:
– timeZone
– setTimeZone:
Returns the background color of the receiver.
- (NSColor *)backgroundColor
The background color of the receiver.
NSDatePicker.hReturns the calendar used by the receiver.
- (NSCalendar *)calendar
The calendar used by the receiver.
NSDatePicker.hReturns a bitmask that indicates which visual elements of the date picker are currently shown, and which won't be usable because they are hidden.
- (NSDatePickerElementFlags)datePickerElements
A bitmask that specifies the date picker elements displayed by the receiver. See “Constants” in NSDatePickerCell for a description of the possible values.
NSDatePicker.hReturns the receiver’s date picker mode.
- (NSDatePickerMode)datePickerMode
The receiver’s date picker mode.
NSDatePicker.hReturns the receiver’s date picker style.
- (NSDatePickerStyle)datePickerStyle
The receiver’s date picker style.
NSDatePicker.hReturns the receiver’s date.
- (NSDate *)dateValue
The receiver’s date.
NSDatePicker.hReturns the delegate of the receiver’s date picker cell.
- (id)delegate
The delegate of the receiver’s date picker cell.
The date picker’s NSDatePickerCell instance handles all delegate methods.
NSDatePicker.hReturns whether the receiver draws the background.
- (BOOL)drawsBackground
TRUE if the receiver draws the background, FALSE otherwise.
NSDatePicker.hReturns whether the receiver has a bezeled border.
- (BOOL)isBezeled
TRUE if the receiver has a bezeled border, FALSE otherwise.
NSDatePicker.hReturns whether the receiver has a plain border.
- (BOOL)isBordered
TRUE if the receiver has a plain border, FALSE otherwise.
NSDatePicker.hReturns the receiver’s locale.
- (NSLocale *)locale
The receiver’s locale.
NSDatePicker.hReturns the maximum date value the receiver allows as input.
- (NSDate *)maxDate
The maximum date value the receiver allows as input. nil indicates no maximum date.
NSDatePicker.hReturns the minimum date value the receiver allows as input.
- (NSDate *)minDate
The minimum date value the receiver allows as input. nil indicates no minimum date.
NSDatePicker.hSets the receiver’s background color.
- (void)setBackgroundColor:(NSColor *)color
The new background color.
NSDatePicker.hSpecifies whether the receiver draws a bezeled border.
- (void)setBezeled:(BOOL)flag
TRUE if the receiver has a bezeled border, FALSE otherwise.
NSDatePicker.hSpecifies whether the receiver draws a plain border.
- (void)setBordered:(BOOL)flag
TRUE if the receiver has a plain border, FALSE otherwise.
NSDatePicker.hSets the receiver’s calendar.
- (void)setCalendar:(NSCalendar *)newCalendar
The new calendar.
NSDatePicker.hSets a bitmask that indicates which visual elements of the date picker are currently shown, and which won't be usable because they are hidden.
- (void)setDatePickerElements:(NSDatePickerElementFlags)elementFlags
A bitmask that specifies the date picker elements displayed by the receiver. See “Constants” in NSDatePickerCell for a description of the possible values.
NSDatePicker.hSets the receiver’s date picker mode.
- (void)setDatePickerMode:(NSDatePickerMode)newMode
The new date picker mode.
NSDatePicker.hSets the receiver’s date picker style.
- (void)setDatePickerStyle:(NSDatePickerStyle)newStyle
The new date picker style.
NSDatePicker.hSets the receiver’s date to a new starting value.
- (void)setDateValue:(NSDate *)newStartDate
The new starting date.
NSDatePicker.hSets the delegate of the receiver’s date picker cell.
- (void)setDelegate:(id)anObject
The new delegate.
The date picker’s NSDatePickerCell instance handles all delegate methods.
NSDatePicker.hSpecifies whether the receiver draws the background.
- (void)setDrawsBackground:(BOOL)flag
TRUE if the receiver draws the background, FALSE otherwise.
NSDatePicker.hSets the receiver’s locale.
- (void)setLocale:(NSLocale *)newLocale
The new locale.
NSDatePicker.hSets the maximum date allowed as input by the receiver.
- (void)setMaxDate:(NSDate *)date
The maximum date allowed as input by the receiver. nil indicates no maximum date.
NSDatePicker.hSets the minimum date allowed as input by the receiver.
- (void)setMinDate:(NSDate *)date
The minimum date allowed as input by the receiver. nil indicates no minimum date.
NSDatePicker.hSets the text color of the receiver.
- (void)setTextColor:(NSColor *)color
The new text color.
NSDatePicker.hSets the time interval of the date range.
- (void)setTimeInterval:(NSTimeInterval)newTimeInterval
The new time interval.
The time interval only applies when the receiver is in the NSRangeDateMode mode.
NSDatePicker.hSets the receiver’s time zone.
- (void)setTimeZone:(NSTimeZone *)newTimeZone
The new time zone.
NSDatePicker.hReturns the text color of the receiver.
- (NSColor *)textColor
The text color of the receiver.
NSDatePicker.hReturns the time interval that represents the date range.
- (NSTimeInterval)timeInterval
The time interval that represents the receiver’s date range. The date range begins at the date returned by dateValue. This method returns 0 when the receiver is not in the NSRangeDateMode mode.
Prior to Mac OS X v 10.5, this method always returned 0.
NSDatePicker.hReturns the receiver’s time zone.
- (NSTimeZone *)timeZone
The receiver’s time zone.
NSDatePicker.h
© 2008 Apple Inc. All Rights Reserved. (Last updated: 2008-06-09)