Project

General

Profile

Bug #3574

Wt::WCalendar browseToNextMonth() does not work correctly

Added by Anonymous almost 8 years ago. Updated almost 8 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
09/10/2014
Due date:
% Done:

0%

Estimated time:

Description

clicking a date in the next month from December and attaching an event to the calendar that calls browseToNextMonth() takes the calendar to November in the same year.

Additionally when using a calendar which is connected to a WDateEdit as shown below, the calendar will only browse to the next once but it will browse to the previous month as expected.

@

Wt::WDateEdit* de = new Wt::WDateEdit(root());

Wt::WCalendar* cal = de->calendar();

cal->setSelectionMode(Wt::SelectionMode::ExtendedSelection);

cal->clicked().connect(std::bind([=](Wt::WDate d) {

std::cout << cal->currentMonth();

std::cout << d.month();

if(d.month() > cal->currentMonth())

{

std::cout << "GO NEXT\n";

cal->browseToNextMonth();

return;

}

else if(d.month() < cal->currentMonth())

{

std::cout << "GO PREV\n";

cal->browseToPreviousMonth();

return;

}

}, std::placeholders::_1));@

Also available in: Atom PDF