[Calendar] Added recounting endDate when startDate gets changed
authorWojciech Kosowicz <w.kosowicz@samsung.com>
Thu, 8 Jan 2015 13:56:07 +0000 (14:56 +0100)
committerWojciech Kosowicz <w.kosowicz@samsung.com>
Thu, 8 Jan 2015 14:18:35 +0000 (15:18 +0100)
endDate/dueDate attribute should be recounted every time the setter
for startDate attribute  is used in CalendarTask or CalendarEvent

Change-Id: I8351f83972124f7e547caf48236b2681eb350f5c
Signed-off-by: Wojciech Kosowicz <w.kosowicz@samsung.com>
src/calendar/js/tizen.calendar.CalendarItem.js

index 5d41f71bccf62156d3785f82509d9d396c1ca71c..c7de25d329f00fff08cb74e34264e72d48c65cdc 100644 (file)
@@ -195,6 +195,7 @@ var CalendarItem = function(data) {
       },
       set: function(v) {
         _startDate = v instanceof tizen.TZDate ? v : _startDate;
+        this.duration = _duration;
       },
       enumerable: true
     },