Automatically determine the first weekday for a calendar control
If neither wxCAL_SUNDAY_FIRST or wxCAL_MONDAY_FIRST was given, use wxDateTime::GetFirstWeekDay() to automatically determine the preferred day. This changes the earlier default behaviour, which was to use Sunday if not otherwise specified. However, the wxGTK native calendar control ignored this behaviour anyway.
This commit is contained in:
@@ -27,7 +27,7 @@
|
||||
enum
|
||||
{
|
||||
// show Sunday as the first day of the week (default)
|
||||
wxCAL_SUNDAY_FIRST = 0x0000,
|
||||
wxCAL_SUNDAY_FIRST = 0x0080,
|
||||
|
||||
// show Monday as the first day of the week
|
||||
wxCAL_MONDAY_FIRST = 0x0001,
|
||||
@@ -332,6 +332,9 @@ protected:
|
||||
|
||||
// called by EnableHolidayDisplay()
|
||||
virtual void RefreshHolidays() { }
|
||||
|
||||
// does the week start on monday based on flags and OS settings?
|
||||
bool WeekStartsOnMonday() const;
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user