Popup get date
popup_get_date
Display a calendar window, get the user's choice, return as a tuple (mon, day, year)
popup_get_date(
start_mon = None,
start_day = None,
start_year = None,
begin_at_sunday_plus = 0,
no_titlebar = True,
title = "Choose Date",
keep_on_top = True,
location = (None, None),
relative_location = (None, None),
close_when_chosen = False,
icon = None,
locale = None,
month_names = None,
day_abbreviations = None,
day_font = "TkFixedFont 9",
mon_year_font = "TkFixedFont 10",
arrow_font = "TkFixedFont 7",
modal = True
)
Parameter Descriptions
Name | Type | Default | Description |
---|---|---|---|
arrow_font | str or tuple | TkFixedFont 7 | Font and size to use for the arrow buttons |
begin_at_sunday_plus | int | 0 | Determines the left-most day in the display. 0=sunday, 1=monday, etc |
close_when_chosen | bool | False | If True, the window will close and function return when a day is clicked |
day_abbreviations | List[str] | None | optional list of abbreviations to display as the day of week |
day_font | str or tuple | TkFixedFont 9 | Font and size to use for the calendar |
icon | (str or bytes) | None | Same as Window icon parameter. Can be either a filename or Base64 value. For Windows if filename, it MUST be ICO format. For Linux, must NOT be ICO |
keep_on_top | bool | True | If True the window will remain above all current windows |
locale | str | None | locale used to get the day names |
location | (int, int) | (None, None) | (x,y) location on the screen to place the top left corner of your window. Default is to center on screen |
modal | bool | True | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True |
mon_year_font | str or tuple | TkFixedFont 10 | Font and size to use for the month and year at the top |
month_names | List[str] | None | optional list of month names to use (should be 12 items) |
no_titlebar | bool | True | If True no titlebar will be shown |
relative_location | (int, int) | (None, None) | (x,y) location relative to the default location of the window, in pixels. Normally the window centers. This location is relative to the location the window would be created. Note they can be negative. |
start_day | int or None | None | The starting day - optional. Set to None or 0 if no date to be chosen at start |
start_mon | int | None | The starting month |
start_year | int | None | The starting year |
title | str | Choose Date | Title that will be shown on the window |
RETURN | None or (int, int, int) | Tuple containing (month, day, year) of chosen date or None if was cancelled |