+// ----------------------------------------------------------------------------
+// wxMonthComboBox and wxYearSpinCtrl
+// ----------------------------------------------------------------------------
+
+wxMonthComboBox::wxMonthComboBox(wxCalendarCtrl *cal)
+ : wxComboBox(cal->GetParent(), -1,
+ wxEmptyString,
+ wxDefaultPosition,
+ wxDefaultSize,
+ 0, NULL,
+ wxCB_READONLY)
+{
+ m_cal = cal;
+
+ wxDateTime::Month m;
+ for ( m = wxDateTime::Jan; m < wxDateTime::Inv_Month; wxNextMonth(m) )
+ {
+ Append(wxDateTime::GetMonthName(m));
+ }
+
+ SetSelection(m_cal->GetDate().GetMonth());
+}
+
+wxYearSpinCtrl::wxYearSpinCtrl(wxCalendarCtrl *cal)
+ : wxSpinCtrl(cal->GetParent(), -1,
+ cal->GetDate().Format(_T("%Y")),
+ wxDefaultPosition,
+ wxDefaultSize,
+ wxSP_ARROW_KEYS,
+ -4300, 10000, cal->GetDate().GetYear())
+{
+ m_cal = cal;
+}
+