Skip to content

Commit

Permalink
Merge pull request #66 from sakshityagi/master
Browse files Browse the repository at this point in the history
Fixed the pivotal tracker issue #123079011 for Done cannot be clicked
  • Loading branch information
DanielHindi authored Jun 29, 2016
2 parents a8bb9e2 + 8c2e089 commit 67cdcde
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion control/content/controllers/content.event.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,12 @@
};

ContentEvent.isValidEvent = function (event) {
balanceDateTime()

if ((+new Date(event.startTime) >= +new Date(event.endTime))) {
ContentEvent.event.data.endDate = ContentEvent.event.data.startDate;
ContentEvent.event.data.endTime = moment(ContentEvent.event.data.startTime).add('10', 'minute');
}
balanceDateTime();
if (event.isAllDay) {
// Check if start date of the event is not less than repeat event starts on date
if (event.repeat && event.repeat.isRepeating && event.repeat.startDate)
Expand Down
2 changes: 1 addition & 1 deletion test/control/content/content.event.controller.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ describe('Unit : Event Manual Plugin content.event.controller.js', function () {
};
ContentEvent.setEndDay();
$rootScope.$apply();
expect(ContentEvent.event.data.endDate).toEqual('Sun Oct 16 2016 00:00:00 GMT+0530 (IST)');
expect(ContentEvent.event.data.endDate).toEqual(1476556800000);
});

it('it should pass if ContentEvent.editLink', function () {
Expand Down

0 comments on commit 67cdcde

Please sign in to comment.