.TH wxDatePickerCtrl 3erl "wx 2.2.2.1" "wxWidgets team." "Erlang Module Definition" .SH NAME wxDatePickerCtrl \- Functions for wxDatePickerCtrl class .SH DESCRIPTION .LP This control allows the user to select a date\&. Unlike \fIwxCalendarCtrl\fR\&, which is a relatively big control, \fIwxDatePickerCtrl\fR\& is implemented as a small window showing the currently selected date\&. The control can be edited using the keyboard, and can also display a popup window for more user-friendly date selection, depending on the styles used and the platform\&. .LP It is only available if \fIwxUSE_DATEPICKCTRL\fR\& is set to 1\&. .LP Styles .LP This class supports the following styles: .LP See: \fIwxTimePickerCtrl\fR\& (not implemented in wx), \fIwxCalendarCtrl\fR\&, \fIwxDateEvent\fR\& .LP This class is derived (and can use functions) from: \fIwxPickerBase\fR\& \fIwxControl\fR\& \fIwxWindow\fR\& \fIwxEvtHandler\fR\& .LP wxWidgets docs: wxDatePickerCtrl .SH "EVENTS" .LP Event types emitted from this class: \fIdate_changed\fR\& .SH DATA TYPES .nf \fBwxDatePickerCtrl()\fR\& = wx:wx_object() .br .fi .SH EXPORTS .LP .nf .B new() -> wxDatePickerCtrl() .br .fi .br .RS .LP Default constructor\&. .RE .LP .nf .B new(Parent, Id) -> wxDatePickerCtrl() .br .fi .br .RS .LP Types: .RS 3 Parent = wxWindow:wxWindow() .br Id = integer() .br .RE .RE .LP .nf .B new(Parent, Id, Options :: [Option]) -> wxDatePickerCtrl() .br .fi .br .RS .LP Types: .RS 3 Parent = wxWindow:wxWindow() .br Id = integer() .br Option = .br {date, wx:wx_datetime()} | .br {pos, {X :: integer(), Y :: integer()}} | .br {size, {W :: integer(), H :: integer()}} | .br {style, integer()} | .br {validator, wx:wx_object()} .br .RE .RE .RS .LP Initializes the object and calls \fICreate()\fR\& (not implemented in wx) with all the parameters\&. .RE .LP .nf .B getRange(This, Dt1, Dt2) -> boolean() .br .fi .br .RS .LP Types: .RS 3 This = wxDatePickerCtrl() .br Dt1 = Dt2 = wx:wx_datetime() .br .RE .RE .RS .LP If the control had been previously limited to a range of dates using \fIsetRange/3\fR\&, returns the lower and upper bounds of this range\&. .LP If no range is set (or only one of the bounds is set), \fIdt1\fR\& and/or \fIdt2\fR\& are set to be invalid\&. .LP Notice that when using a native MSW implementation of this control the lower range is always set, even if \fIsetRange/3\fR\& hadn\&'t been called explicitly, as the native control only supports dates later than year 1601\&. .LP Return: false if no range limits are currently set, true if at least one bound is set\&. .RE .LP .nf .B getValue(This) -> wx:wx_datetime() .br .fi .br .RS .LP Types: .RS 3 This = wxDatePickerCtrl() .br .RE .RE .RS .LP Returns the currently entered date\&. .LP For a control with \fIwxDP_ALLOWNONE\fR\& style the returned value may be invalid if no date is entered, otherwise it is always valid\&. .RE .LP .nf .B setRange(This, Dt1, Dt2) -> ok .br .fi .br .RS .LP Types: .RS 3 This = wxDatePickerCtrl() .br Dt1 = Dt2 = wx:wx_datetime() .br .RE .RE .RS .LP Sets the valid range for the date selection\&. .LP If \fIdt1\fR\& is valid, it becomes the earliest date (inclusive) accepted by the control\&. If \fIdt2\fR\& is valid, it becomes the latest possible date\&. .LP 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\&. .LP Remark: If the current value of the control is outside of the newly set range bounds, the behaviour is undefined\&. .RE .LP .nf .B setValue(This, Dt) -> ok .br .fi .br .RS .LP Types: .RS 3 This = wxDatePickerCtrl() .br Dt = wx:wx_datetime() .br .RE .RE .RS .LP Changes the current value of the control\&. .LP The date should be valid unless the control was created with \fIwxDP_ALLOWNONE\fR\& style and included in the currently selected range, if any\&. .LP Calling this method does not result in a date change event\&. .RE .LP .nf .B destroy(This :: wxDatePickerCtrl()) -> ok .br .fi .br .RS .LP Destroys the object\&. .RE