← Back to team overview

ubuntu-touch-coreapps-reviewers team mailing list archive

[Merge] lp:~pkunal-parmar/ubuntu-calendar-app/DefDateTime into lp:ubuntu-calendar-app

 

Kunal Parmar has proposed merging lp:~pkunal-parmar/ubuntu-calendar-app/DefDateTime into lp:ubuntu-calendar-app.

Commit message:
Resolving Bug #1311133,

Requested reviews:
  Ubuntu Calendar Developers (ubuntu-calendar-dev)
Related bugs:
  Bug #1311133 in Ubuntu Calendar App: "default start/end times for new event should be changed"
  https://bugs.launchpad.net/ubuntu-calendar-app/+bug/1311133

For more details, see:
https://code.launchpad.net/~pkunal-parmar/ubuntu-calendar-app/DefDateTime/+merge/253451

Resolving Bug #1311133,

As per bfiller's comment
"I am re-opening this bug as it's not fixed. When creating a new event from the toolbar, the start time defaults to 12:30am and end time 1:30am. This does not make a lot of sense from a usability perspective. It's not a very common time when people events.

New events start time should default to the current time of day and end time 1 hr later. Would be a more sensible default I think."

If time is starting from 0:0, then using current time.
-- 
Your team Ubuntu Calendar Developers is requested to review the proposed merge of lp:~pkunal-parmar/ubuntu-calendar-app/DefDateTime into lp:ubuntu-calendar-app.
=== modified file 'NewEvent.qml'
--- NewEvent.qml	2015-03-12 14:44:42 +0000
+++ NewEvent.qml	2015-03-19 00:03:21 +0000
@@ -65,6 +65,9 @@
         //If current date is setted by an argument we don't have to change it.
         if(typeof(date) === 'undefined'){
             date = new Date();
+        }
+
+        if( typeof(date) == 'undefined' || (date.getHours() == 0 && date.getMinutes() == 0) ) {
             var newDate = new Date();
             date.setHours(newDate.getHours(), newDate.getMinutes());
         }


Follow ups