Show the current range of valid dates in the calendar sample.
See #11081 (point C). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61751 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -799,6 +799,18 @@ void MyPanel::LimitDateRange(bool on)
|
||||
if ( m_calendar->SetDateRange(today - diff, today + diff) )
|
||||
{
|
||||
wxLogStatus("Date range limited to 3 months around today.");
|
||||
wxDateTime firstValidDate;
|
||||
wxDateTime lastValidDate;
|
||||
if ( m_calendar->GetDateRange(&firstValidDate, &lastValidDate) )
|
||||
{
|
||||
wxLogMessage("First valid date: %s, last valid date: %s",
|
||||
firstValidDate.FormatISODate(),
|
||||
lastValidDate.FormatISODate());
|
||||
}
|
||||
else
|
||||
{
|
||||
wxLogWarning("Failed to get back the valid dates range.");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user