wxDatePickerCtrl(3erl)
π NAME π
okay bestie, welcome to the wxDatePickerCtrl page from the 3erl manual β aka wxDatePickerCtrl(3erl). Itβs all about Functions for wxDatePickerCtrl class β¨
πΈ DESCRIPTION πΈ
This control lets the user pick a date. Unlike wxCalendarCtrl, which is a relatively big control, wxDatePickerCtrl is implemented as a small window showing the currently selected date. The control can be edited using the keyboard, and it can also display a popup window for more user-friendly date selection, depending on the styles used and the platform. Iconic behavior, honestly π
It is only available if wxUSE_DATEPICKCTRL is set to 1. No cap.
π¦ Styles
This class supports the following styles:
(the page says this class supports the following styles, then jumps straight to the references below β no style list spelled out right here, bestie π)
See: wxTimePickerCtrl (not implemented in wx), wxCalendarCtrl, wxDateEvent
This class is derived (and can use functions) from: wxPickerBase wxControl wxWindow wxEvtHandler
wxWidgets docs: wxDatePickerCtrl
π₯ EVENTS π₯
Event types emitted from this class: date_changed
π DATA TYPES π
wxDatePickerCtrl() = wx:wx_object()
β¨ EXPORTS β¨
new() -> wxDatePickerCtrl()
Default constructor. Very demure, very mindful π
new(Parent, Id) -> wxDatePickerCtrl()
Types:
Parent = wxWindow:wxWindow()
Id = integer()
new(Parent, Id, Options :: [Option]) -> wxDatePickerCtrl()
Types:
Parent = wxWindow:wxWindow()
Id = integer()
Option =
{date, wx:wx_datetime()} |
{pos, {X :: integer(), Y :: integer()}} |
{size, {W :: integer(), H :: integer()}} |
{style, integer()} |
{validator, wx:wx_object()}
Initializes the object and calls Create() (not implemented in wx) with all the parameters. Slay π
getRange(This, Dt1, Dt2) -> boolean()
Types:
This = wxDatePickerCtrl()
Dt1 = Dt2 = wx:wx_datetime()
If the control had been previously limited to a range of dates using setRange/3, returns the lower and upper bounds of this range. Very βtell me your limitsβ of it π«Ά
If no range is set (or only one of the bounds is set), dt1 and/or dt2 are set to be invalid.
Notice that when using a native MSW implementation of this control the lower range is always set, even if setRange/3 hadnβt been called explicitly, as the native control only supports dates later than year 1601. Lowkey important, fr fr.
Return: false if no range limits are currently set, true if at least one bound is set.
getValue(This) -> wx:wx_datetime()
Types:
This = wxDatePickerCtrl()
Returns the currently entered date. Main character energy: it just gives you the date πΈ
For a control with wxDP_ALLOWNONE style the returned value may be invalid if no date is entered, otherwise it is always valid.
setRange(This, Dt1, Dt2) -> ok
Types:
This = wxDatePickerCtrl()
Dt1 = Dt2 = wx:wx_datetime()
Sets the valid range for the date selection. Boundaries, bestie π
If dt1 is valid, it becomes the earliest date (inclusive) accepted by the control. If dt2 is valid, it becomes the latest possible date.
Notice that if the current value is not inside the new range, it will be adjusted to lie inside it, i.e. calling this method can change the control value, however no events are generated by it. So yeah, it can move your date, but itβs not gonna make a whole event out of it π
Remark: If the current value of the control is outside of the newly set range bounds, the behaviour is undefined.
setValue(This, Dt) -> ok
Types:
This = wxDatePickerCtrl()
Dt = wx:wx_datetime()
Changes the current value of the control. New date, who dis π¦
The date should be valid unless the control was created with wxDP_ALLOWNONE style and included in the currently selected range, if any.
Calling this method does not result in a date change event.
destroy(This :: wxDatePickerCtrl()) -> ok
Destroys the object. Bye bestie πβ¨
Okay thatβs the whole page, bestie π β big ups to the wxWidgets team, this is wx 2.2.2.1, and the page name is wxDatePickerCtrl(3erl). The footer doesnβt give us a date, so no invented date era for us π«Άπ
π¦ where this page comes from
- ubuntu noble: erlang-manpages 1:25.3.2.8+dfsg-1ubuntu4 Β· Apache-2.0
- ubuntu noble: erlang-manpages 1:25.3.2.8+dfsg-1ubuntu4.8 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms