| Inherits from | |
| Conforms to | |
| Framework | /System/Library/Frameworks/AppKit.framework |
| Availability | Available in Mac OS X v10.4 and later. |
| Declared in | NSDatePickerCell.h |
| Related sample code |
An NSDatePickerCell instance controls the behavior of an NSDatePicker control, or of a single date picker cell in a matrix.
– backgroundColor
– setBackgroundColor:
– drawsBackground
– setDrawsBackground:
– textColor
– setTextColor:
– datePickerStyle
– setDatePickerStyle:
– datePickerElements
– setDatePickerElements:
– dateValue
– setDateValue:
– timeInterval
– setTimeInterval:
– calendar
– setCalendar:
– locale
– setLocale:
– timeZone
– setTimeZone:
Returns the receiver’s background color.
- (NSColor *)backgroundColor
The receiver’s background color.
NSDatePickerCell.hReturns the calendar used by the receiver.
- (NSCalendar *)calendar
The calendar used by the receiver.
NSDatePickerCell.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” for a description of the possible values.
NSDatePickerCell.hReturns the receiver’s date picker mode.
- (NSDatePickerMode)datePickerMode
The receiver’s date picker mode.
NSDatePickerCell.hReturns the receiver’s date picker style.
- (NSDatePickerStyle)datePickerStyle
The receiver’s date picker style.
NSDatePickerCell.hReturns the receiver’s date.
- (NSDate *)dateValue
The receiver’s date.
NSDatePickerCell.hReturns the receiver’s delegate.
- (id < NSDatePickerCellDelegate >)delegate
The receiver’s delegate.
NSDatePickerCell.hReturns whether the receiver draws the background.
- (BOOL)drawsBackground
YES if the receiver draws the background, otherwise NO.
NSDatePickerCell.hReturns the receiver’s locale.
- (NSLocale *)locale
The receiver’s locale.
NSDatePickerCell.hReturns the maximum date value that the receiver allows as input.
- (NSDate *)maxDate
The maximum date value that the receiver allows as input.
NSDatePickerCell.hReturns the minimum date value that the receiver allows as input.
- (NSDate *)minDate
The minimum date value that the receiver allows as input.
NSDatePickerCell.hSets the receiver’s background color
- (void)setBackgroundColor:(NSColor *)color
The new background color.
NSDatePickerCell.hSets the receiver’s calendar.
- (void)setCalendar:(NSCalendar *)newCalendar
The calendar used by the receiver.
NSDatePickerCell.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” for a description of the possible values.
NSDatePickerCell.hSets the receiver’s date picker mode.
- (void)setDatePickerMode:(NSDatePickerMode)newMode
The new date picker mode.
NSDatePickerCell.hSets the receiver’s date picker style.
- (void)setDatePickerStyle:(NSDatePickerStyle)newStyle
The new date picker style.
NSDatePickerCell.hSets the receiver’s date to a new starting value.
- (void)setDateValue:(NSDate *)newStartDate
The new starting date.
NSDatePickerCell.hSets the receiver's delegate.
- (void)setDelegate:(id < NSDatePickerCellDelegate >)anObject
The receiver's delegate.
NSDatePickerCell.hSets whether the receiver draws the background.
- (void)setDrawsBackground:(BOOL)flag
YES if the receiver draws the background, otherwise NO.
NSDatePickerCell.hSets the receiver’s locale.
- (void)setLocale:(NSLocale *)newLocale
The receiver’s locale.
NSDatePickerCell.hSets the maximum date allowed as input by the receiver to the given date.
- (void)setMaxDate:(NSDate *)date
The maximum date the receiver allows as input. Pass nil to allow any date as the maximum value.
NSDatePickerCell.hSets the minimum date allowed as input by the receiver to the given date.
- (void)setMinDate:(NSDate *)date
The minimum date the receiver allows as input. Pass nil to allow any date as the minimum value.
Passing nil for date allows any date as the minimum value.
NSDatePickerCell.hSets the receiver’s text color.
- (void)setTextColor:(NSColor *)color
The new text color.
NSDatePickerCell.hSets the time interval of the date range.
- (void)setTimeInterval:(NSTimeInterval)newTimeInterval
The time interval of the date range.
The time interval only applies when the receiver is in the NSRangeDateMode mode.
NSDatePickerCell.hSets the receiver’s time zone.
- (void)setTimeZone:(NSTimeZone *)newTimeZone
The receiver’s time zone.
NSDatePickerCell.hReturns the receiver’s text color.
- (NSColor *)textColor
The receiver’s text color.
NSDatePickerCell.hReturns the time interval that represents the date range.
- (NSTimeInterval)timeInterval
The time interval that represents the 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.
NSDatePickerCell.hReturns the receiver’s time zone.
- (NSTimeZone *)timeZone
The receiver’s time zone.
NSDatePickerCell.hSpecifies a type for constants that define the visual appearance of the NSDatePickerCell.
typedef NSUInteger NSDatePickerStyle;
For a discussion of possible values, see “Date Picker Style.”
NSDatePickerCell.hThe NSDatePickerStyle constants define the visual appearance of the NSDatePickerCell. These values are used by datePickerStyle and setDatePickerStyle:.
enum {
NSTextFieldAndStepperDatePickerStyle = 0,
NSClockAndCalendarDatePickerStyle = 1,
NSTextFieldDatePickerStyle = 2
};
typedef NSUInteger NSDatePickerStyle;
NSTextFieldAndStepperDatePickerStyleProvide a text field and stepper style interface.
Available in Mac OS X v10.4 and later.
Declared in NSDatePickerCell.h.
NSClockAndCalendarDatePickerStyleProvide a visual clock and calendar style interface.
Available in Mac OS X v10.4 and later.
Declared in NSDatePickerCell.h.
NSTextFieldDatePickerStyleProvide a text field interface.
Available in Mac OS X v10.5 and later.
Declared in NSDatePickerCell.h.
NSDatePickerCell.hSpecifies a type for constants that define whether the control provides a single date, or a range of dates.
typedef NSUInteger NSDatePickerMode;
For a discussion of possible values, see “Date Picker Mode.”
NSDatePickerCell.hThe NSDatePickerMode constants define whether the control provides a single date, or a range of dates. These values are used by datePickerMode and setDatePickerMode:.
enum {
NSSingleDateMode = 0,
NSRangeDateMode = 1
};
typedef NSUInteger NSDatePickerMode;
NSSingleDateModeAllow selection of a single date.
Available in Mac OS X v10.4 and later.
Declared in NSDatePickerCell.h.
NSRangeDateModeAllow selection of a range of dates. (First implemented in Mac OS X v 10.5.)
Available in Mac OS X v10.4 and later.
Declared in NSDatePickerCell.h.
Prior to Mac OS X v 10.5 only NSSingleDateMode was implemented.
NSDatePickerCell.hSpecifies a type for constants that allow you to specify the date and time elements that the NSDatePickerCell can edit.
typedef NSUInteger NSDatePickerElementFlags;
For a discussion of possible values, see “Date Picker Elements.”
NSDatePickerCell.hThe NSDatePickerElementFlag constants allow you to specify the date and time elements that the NSDatePickerCell can edit by combining these constants using the C bitwise OR operator. These values are used by datePickerElements and setDatePickerElements::
enum {
NSHourMinuteDatePickerElementFlag = 0x000c,
NSHourMinuteSecondDatePickerElementFlag = 0x000e,
NSTimeZoneDatePickerElementFlag = 0x0010,
NSYearMonthDatePickerElementFlag = 0x00c0,
NSYearMonthDayDatePickerElementFlag = 0x00e0,
NSEraDatePickerElementFlag = 0x0100,
};
typedef NSUInteger NSDatePickerElementFlags;
NSHourMinuteDatePickerElementFlagDisplay and allow editing of the hour and minute elements of the date.
Available in Mac OS X v10.4 and later.
Declared in NSDatePickerCell.h.
NSHourMinuteSecondDatePickerElementFlagDisplay and allow editing of the hour, minute and second elements of the date.
Available in Mac OS X v10.4 and later.
Declared in NSDatePickerCell.h.
NSTimeZoneDatePickerElementFlagDisplay and allow editing of the time zone.
This flag has been declared for possible future use, and does not yet have any effect.
Available in Mac OS X v10.4 and later.
Declared in NSDatePickerCell.h.
NSYearMonthDatePickerElementFlagDisplay and allow editing of the year and month elements of the date.
Available in Mac OS X v10.4 and later.
Declared in NSDatePickerCell.h.
NSYearMonthDayDatePickerElementFlagDisplay and allow editing of the year, month and day elements of the date.
Available in Mac OS X v10.4 and later.
Declared in NSDatePickerCell.h.
NSEraDatePickerElementFlagDisplay and allow editing of the era of the date, if applicable.
This flag has been declared for possible future use, and does not yet have any effect.
Available in Mac OS X v10.4 and later.
Declared in NSDatePickerCell.h.
NSDatePickerCell.hLast updated: 2009-04-15