Merge lp:~mhall119/ubuntu-calendar-app/fix-newevent-month-1233442 into lp:ubuntu-calendar-app

Proposed by Michael Hall
Status: Merged
Approved by: Kunal Parmar
Approved revision: 127
Merged at revision: 135
Proposed branch: lp:~mhall119/ubuntu-calendar-app/fix-newevent-month-1233442
Merge into: lp:ubuntu-calendar-app
Diff against target: 16 lines (+5/-0)
1 file modified
NewEvent.qml (+5/-0)
To merge this branch: bzr merge lp:~mhall119/ubuntu-calendar-app/fix-newevent-month-1233442
Reviewer Review Type Date Requested Status
Kunal Parmar Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Review via email: mp+188488@code.launchpad.net

Commit message

Set month and year, as well as date, before saving a new event

Description of the change

Calling startDate.setDate() only sets the day of the month, not the full date (day, month, year), so it was only changing the day of month part of the startDate and endDate.

This patch also sets the month and year for both.

To post a comment you must log in.
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Kunal Parmar (pkunal-parmar) wrote :

works fine.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'NewEvent.qml'
2--- NewEvent.qml 2013-09-26 05:06:15 +0000
3+++ NewEvent.qml 2013-10-01 00:53:28 +0000
4@@ -189,7 +189,12 @@
5 error = 2;
6
7 startDate.setDate(defaultDate.getDate());
8+ startDate.setMonth(defaultDate.getMonth());
9+ startDate.setFullYear(defaultDate.getFullYear());
10+
11 endDate.setDate(defaultDate.getDate());
12+ endDate.setMonth(defaultDate.getMonth());
13+ endDate.setFullYear(defaultDate.getFullYear());
14
15 var event = {
16 title: titleEdit.text,

Subscribers

People subscribed via source and target branches

to status/vote changes: