class documentation

A GUI component for selecting and rendering a date and time.

Two-band layout:
Top band: Month | Day | Year Bottom band: Hour | Min | Sec

Left/right navigates across all 6 fields, up/down changes the value. Returns False when the user is done (CENTER or BACK).

Method __del__ Clean up resources
Method __init__ Initialize the date picker with position, size, and optional initial time.
Method run Run one iteration of the date picker event loop.
Property time Get the currently selected date and time as a tuple.
Method __band Draw a single 3-column drum-roll band.
Method __draw Render the date+time picker on the display.
Method __max_day Return the number of days in the given month (1-indexed).
Constant _DAYS_IN_MONTH Undocumented
Constant _MONTHS Undocumented
Instance Variable _field Undocumented
Instance Variable _needs_redraw Undocumented
Instance Variable _position Undocumented
Instance Variable _size Undocumented
Instance Variable _time Undocumented
Instance Variable _view_manager Undocumented
def __del__(self):

Clean up resources

def __init__(self, view_manager, position, size, time: tuple = None):

Initialize the date picker with position, size, and optional initial time.

Parameters
view_manager:ViewManagerView Manager context.
position:VectorVector with position coordinates.
size:VectorVector with size dimensions.
time:tupleOptional initial date and time (year, month, day of month, weekday, hour, minute, second, subseconds). Defaults to None.
def run(self) -> bool:

Run one iteration of the date picker event loop.

Returns
boolTrue to keep running, False when the user is done.
@property
time =

Get the currently selected date and time as a tuple.

def __band(self, draw, fg, bg, sel, band_y, band_h, col_w, start_x, labels, values, active_col, val_h, lbl_h, lbl_cw, val_font):

Draw a single 3-column drum-roll band.

Parameters
draw:DrawDrawing context.
fg:intForeground color.
bg:intBackground color.
sel:intSelected column highlight color.
band_y:intTop Y position of the band.
band_h:intHeight of the band.
col_w:intWidth of each column.
start_x:intLeft X position of the band.
labels:tupleField labels for the three columns.
values:tupleDisplay strings for the three columns.
active_col:intIndex of the active column, or -1.
val_h:intValue text height.
lbl_h:intLabel text height.
lbl_cw:intLabel character width.
val_font:intFont size for the values.
def __draw(self):

Render the date+time picker on the display.

def __max_day(self, month: int) -> int:

Return the number of days in the given month (1-indexed).

Parameters
month:intThe month number, 1 to 12.
Returns
intThe number of days in the month.
_DAYS_IN_MONTH: tuple[int, ...] =

Undocumented

Value
(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31)
_MONTHS: tuple[str, ...] =

Undocumented

Value
('Jan',
 'Feb',
 'Mar',
 'Apr',
 'May',
 'Jun',
 'Jul',
...
_field =

Undocumented

_needs_redraw: bool =

Undocumented

_position =

Undocumented

_size =

Undocumented

_time =

Undocumented

_view_manager =

Undocumented