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.h
Returns the calendar used by the receiver.
- (NSCalendar *)calendar
The calendar used by the receiver.
NSDatePicker.h
Returns 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.h
Returns the receiver’s date picker mode.
- (NSDatePickerMode)datePickerMode
The receiver’s date picker mode.
NSDatePicker.h
Returns the receiver’s date picker style.
- (NSDatePickerStyle)datePickerStyle
The receiver’s date picker style.
NSDatePicker.h
Returns the receiver’s date.
- (NSDate *)dateValue
The receiver’s date.
NSDatePicker.h
Returns 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.h
Returns whether the receiver draws the background.
- (BOOL)drawsBackground
TRUE
if the receiver draws the background, FALSE
otherwise.
NSDatePicker.h
Returns whether the receiver has a bezeled border.
- (BOOL)isBezeled
TRUE
if the receiver has a bezeled border, FALSE
otherwise.
NSDatePicker.h
Returns whether the receiver has a plain border.
- (BOOL)isBordered
TRUE
if the receiver has a plain border, FALSE
otherwise.
NSDatePicker.h
Returns the receiver’s locale.
- (NSLocale *)locale
The receiver’s locale.
NSDatePicker.h
Returns 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.h
Returns 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.h
Sets the receiver’s background color.
- (void)setBackgroundColor:(NSColor *)color
The new background color.
NSDatePicker.h
Specifies whether the receiver draws a bezeled border.
- (void)setBezeled:(BOOL)flag
TRUE
if the receiver has a bezeled border, FALSE
otherwise.
NSDatePicker.h
Specifies whether the receiver draws a plain border.
- (void)setBordered:(BOOL)flag
TRUE
if the receiver has a plain border, FALSE
otherwise.
NSDatePicker.h
Sets the receiver’s calendar.
- (void)setCalendar:(NSCalendar *)newCalendar
The new calendar.
NSDatePicker.h
Sets 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.h
Sets the receiver’s date picker mode.
- (void)setDatePickerMode:(NSDatePickerMode)newMode
The new date picker mode.
NSDatePicker.h
Sets the receiver’s date picker style.
- (void)setDatePickerStyle:(NSDatePickerStyle)newStyle
The new date picker style.
NSDatePicker.h
Sets the receiver’s date to a new starting value.
- (void)setDateValue:(NSDate *)newStartDate
The new starting date.
NSDatePicker.h
Sets 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.h
Specifies whether the receiver draws the background.
- (void)setDrawsBackground:(BOOL)flag
TRUE
if the receiver draws the background, FALSE
otherwise.
NSDatePicker.h
Sets the receiver’s locale.
- (void)setLocale:(NSLocale *)newLocale
The new locale.
NSDatePicker.h
Sets 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.h
Sets 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.h
Sets the text color of the receiver.
- (void)setTextColor:(NSColor *)color
The new text color.
NSDatePicker.h
Sets 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.h
Sets the receiver’s time zone.
- (void)setTimeZone:(NSTimeZone *)newTimeZone
The new time zone.
NSDatePicker.h
Returns the text color of the receiver.
- (NSColor *)textColor
The text color of the receiver.
NSDatePicker.h
Returns 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.h
Returns 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)