Implement wxCalendarCtrl::SetDateRange() in the native GTK version.
While GTK+ doesn't support imposing ranges for dates selection natively, we can do it ourselves by preventing the user from selecting any date outside of the currently valid range. This allows to use ranges under all platforms and not only in wxCalendarCtrl itself but in wxDatePickerCtrl as well. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67987 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -424,7 +424,9 @@ public:
|
||||
/**
|
||||
Sets the current date.
|
||||
|
||||
The @a date parameter must be valid.
|
||||
The @a date parameter must be valid and in the currently valid range as
|
||||
set by SetDateRange(), otherwise the current date is not changed and
|
||||
the function returns @false.
|
||||
*/
|
||||
virtual bool SetDate(const wxDateTime& date);
|
||||
|
||||
@@ -476,14 +478,12 @@ public:
|
||||
|
||||
/**
|
||||
@name Date Range Functions
|
||||
|
||||
The functions in this section are currently implemented in the generic
|
||||
and MSW versions and do nothing in the native GTK implementation.
|
||||
*/
|
||||
//@{
|
||||
|
||||
/**
|
||||
Restrict the dates shown by the control to the specified range.
|
||||
Restrict the dates that can be selected in the control to the specified
|
||||
range.
|
||||
|
||||
If either date is set, the corresponding limit will be enforced and
|
||||
@true returned. If none are set, the existing restrictions are removed
|
||||
|
Reference in New Issue
Block a user