DatePicker

class vanilla.DatePicker(posSize, date=None, minDate=None, maxDate=None, showStepper=True, mode='text', timeDisplay='hourMinuteSecond', dateDisplay='yearMonthDay', callback=None, sizeStyle='regular')

posSize Tuple of form (left, top, width, height) representing the position and size of the date picker control.

Standard Dimensions - Text Mode
Regular H 22
Small H 19
Mini H 16
Standard Dimensions - Graphical Mode
Calendar and Clock 227w 148h
Calendar 139w 148h
Clock 122w 123h

date A NSDate object representing the date and time that should be set in the control.

minDate A NSDate object representing the lowest date and time that can be set in the control.

maxDate A NSDate object representing the highest date and time that can be set in the control.

showStepper A boolean indicating if the thumb stepper should be shown in text mode.

mode A string representing the desired mode for the date picker control. The options are:

“text”
“graphical”

timeDisplay A string representing the desired time units that should be displayed in the date picker control. The options are:

None Do not display time.
“hourMinute” Display hour and minute.
“hourMinuteSecond” Display hour, minute, second.

dateDisplay A string representing the desired date units that should be displayed in the date picker control. The options are:

None Do not display date.
“yearMonth” Display year and month.
“yearMonthDay” Display year, month and day.

sizeStyle A string representing the desired size style of the date picker control. This only applies in text mode. The options are:

“regular”
“small”
“mini”
enable(onOff)

Enable or disable the object. onOff should be a boolean.

get()

Get the contents of the date picker control.

getNSDatePicker()

Return the NSDatePicker that this object wraps.

getPosSize()

The position and size of the object as a tuple of form (left, top, width, height).

getTitle()

Get the control title.

isVisible()

Return a bool indicting if the object is visible or not.

move(x, y)

Move the object by x units and y units.

resize(width, height)

Change the size of the object to width and height.

set(value)

Set the contents of the date picker control.

value A NSDate object.

setPosSize(posSize)

Set the postion and size of the object.

posSize A tuple of form (left, top, width, height).

setTitle(title)

Set the control title.

title A string representing the title.

show(onOff)

Show or hide the object.

onOff A boolean value representing if the object should be shown or not.