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:
– datePickerCell:validateProposedDateValue:timeInterval:
delegate method
Returns the receiver’s background color.
- (NSColor *)backgroundColor
The receiver’s background color.
NSDatePickerCell.h
Returns the calendar used by the receiver.
- (NSCalendar *)calendar
The calendar used by the receiver.
NSDatePickerCell.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” for a description of the possible values.
NSDatePickerCell.h
Returns the receiver’s date picker mode.
- (NSDatePickerMode)datePickerMode
The receiver’s date picker mode.
NSDatePickerCell.h
Returns the receiver’s date picker style.
- (NSDatePickerStyle)datePickerStyle
The receiver’s date picker style.
NSDatePickerCell.h
Returns the receiver’s date.
- (NSDate *)dateValue
The receiver’s date.
NSDatePickerCell.h
Returns the receiver’s delegate.
- (id)delegate
The receiver’s delegate.
NSDatePickerCell.h
Returns whether the receiver draws the background.
- (BOOL)drawsBackground
YES
if the receiver draws the background, otherwise NO
.
NSDatePickerCell.h
Returns the receiver’s locale.
- (NSLocale *)locale
The receiver’s locale.
NSDatePickerCell.h
Returns the maximum date value that the receiver allows as input.
- (NSDate *)maxDate
The maximum date value that the receiver allows as input.
NSDatePickerCell.h
Returns the minimum date value that the receiver allows as input.
- (NSDate *)minDate
The minimum date value that the receiver allows as input.
NSDatePickerCell.h
Sets the receiver’s background color
- (void)setBackgroundColor:(NSColor *)color
The new background color.
NSDatePickerCell.h
Sets the receiver’s calendar.
- (void)setCalendar:(NSCalendar *)newCalendar
The calendar used by the receiver.
NSDatePickerCell.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” for a description of the possible values.
NSDatePickerCell.h
Sets the receiver’s date picker mode.
- (void)setDatePickerMode:(NSDatePickerMode)newMode
The new date picker mode.
NSDatePickerCell.h
Sets the receiver’s date picker style.
- (void)setDatePickerStyle:(NSDatePickerStyle)newStyle
The new date picker style.
NSDatePickerCell.h
Sets the receiver’s date to a new starting value.
- (void)setDateValue:(NSDate *)newStartDate
The new starting date.
NSDatePickerCell.h
Sets the receiver's delegate.
- (void)setDelegate:(id)anObject
The receiver's delegate.
NSDatePickerCell.h
Sets whether the receiver draws the background.
- (void)setDrawsBackground:(BOOL)flag
YES
if the receiver draws the background, otherwise NO
.
NSDatePickerCell.h
Sets the receiver’s locale.
- (void)setLocale:(NSLocale *)newLocale
The receiver’s locale.
NSDatePickerCell.h
Sets 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.h
Sets 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.h
Sets the receiver’s text color.
- (void)setTextColor:(NSColor *)color
The new text color.
NSDatePickerCell.h
Sets 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.h
Sets the receiver’s time zone.
- (void)setTimeZone:(NSTimeZone *)newTimeZone
The receiver’s time zone.
NSDatePickerCell.h
Returns the receiver’s text color.
- (NSColor *)textColor
The receiver’s text color.
NSDatePickerCell.h
Returns 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.h
Returns the receiver’s time zone.
- (NSTimeZone *)timeZone
The receiver’s time zone.
NSDatePickerCell.h
The delegate receives this message each time the user attempts to change the receiver‘s value, allowing the delegate the opportunity to override the change.
- (void)datePickerCell:(NSDatePickerCell *)aDatePickerCell validateProposedDateValue:(NSDate **)proposedDateValue timeInterval:(NSTimeInterval *)proposedTimeInterval
The cell cell that sent the message.
On input, contains the proposed new date. The delegate may change this value before returning.
On input, contains the proposed new time interval. The delegate may change this value before returning.
When returning a new proposedDateValue, the NSDate
instance should be autoreleased, and the proposedDateValue should not be released by the delegate.
The proposedDateValue and proposedTimeInterval are guaranteed to lie between the dates returned by minDate
and maxDate
. If you modify these values, you should ensure that the new values are within the appropriate range.
NSDatePickerCell.h
Specifies 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.h
The 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;
NSTextFieldAndStepperDatePickerStyle
Provide a text field and stepper style interface.
Available in Mac OS X v10.4 and later.
Declared in NSDatePickerCell.h
.
NSClockAndCalendarDatePickerStyle
Provide a visual clock and calendar style interface.
Available in Mac OS X v10.4 and later.
Declared in NSDatePickerCell.h
.
NSTextFieldDatePickerStyle
Provide a text field interface.
Available in Mac OS X v10.5 and later.
Declared in NSDatePickerCell.h
.
NSDatePickerCell.h
Specifies 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.h
The 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;
NSSingleDateMode
Allow selection of a single date.
Available in Mac OS X v10.4 and later.
Declared in NSDatePickerCell.h
.
NSRangeDateMode
Allow 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.h
Specifies 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.h
The 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;
NSHourMinuteDatePickerElementFlag
Display 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
.
NSHourMinuteSecondDatePickerElementFlag
Display 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
.
NSTimeZoneDatePickerElementFlag
Display 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
.
NSYearMonthDatePickerElementFlag
Display 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
.
NSYearMonthDayDatePickerElementFlag
Display 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
.
NSEraDatePickerElementFlag
Display 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.h
© 2008 Apple Inc. All Rights Reserved. (Last updated: 2008-06-09)