Details
-
Bug
-
Resolution: Fixed
-
P3: Somewhat important
-
5.11.2
-
None
-
-
57325020f (dev)
Description
I was working with the Qt.labs.calendar MonthGrid. When using the delegate I compared the model.day with the model.date.getDate() and they do not match. The onClicked returns the model.date from the current cell that was clicked which is wrong.
Below is example code that compares the two objects.
Labs.MonthGrid{ id: monthGrid Layout.fillWidth: true Layout.fillHeight: true month: model.month year: model.year locale: Qt.locale("en_US") delegate: Column{Label{ horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter opacity: model.month === monthGrid.month ? 1 : 0.5 text: model.month +"/"+model.day+"/"+model.year } Label{ horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter opacity: model.month === monthGrid.month ? 1 : 0.5 text: model.date.getMonth()+"/"+model.date.getDate()+"/" +model.date.getYear() } Label{ horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter text: model.day !== model.date.getDate() ? "Wrong Date":"Correct Date" } } onClicked: { console.log("onClicked date", date) } onPressAndHold: { console.log("onPressAndHold date", date) } onPressed: { console.log("onPressed date", date) } onReleased: { console.log("onReleased date", date) } }
Attached is an image of the test program I was using. It compares the QtQuick.Controls 1.4 Calendar against one made with Qt.labs.calendar
Attachments
Issue Links
- is duplicated by
-
QTBUG-137723 MonthGrid OnClicked Documentation Should Reference Time is Given in UTC 00:00:00 Before Being Converted to Timezone
-
- Closed
-
- relates to
-
QTBUG-64485 QDateEdit has a problem of display 2017-10-15
-
- Closed
-
-
QTBUG-114525 Implement ECMAScrip'ts Temporal in QML's V4 engine
-
- Open
-
For Gerrit Dashboard: QTBUG-72208 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
657218,1 | MonthGrid: fix dates being incorrect for certain timezones | 6.10 | qt/qtdeclarative | Status: NEW | 0 | 0 |
657389,3 | MonthGrid: address post-merge review feedback on timezone patch | dev | qt/qtdeclarative | Status: NEW | 0 | 0 |
654339,10 | MonthGrid: fix dates being incorrect for certain timezones | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |