Skip to content

Commit

Permalink
Fixed creation of due in NewItem
Browse files Browse the repository at this point in the history
  • Loading branch information
Roy Kokkelkoren committed May 8, 2016
1 parent f84a7ba commit 32e69e6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion install.rdf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<Description about="urn:mozilla:install-manifest">
<em:id>[email protected]</em:id>
<em:name>Todo.txt Extension</em:name>
<em:version>0.6</em:version>
<em:version>0.6.1</em:version>
<em:type>2</em:type>
<em:creator>Roy Kokkelkoren</em:creator>
<em:description>Thunderbird extension for the Todo.txt application</em:description>
Expand Down
7 changes: 7 additions & 0 deletions modules/todoclient.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,13 @@ let todoClient = {
createDate = cal.jsDateToDateTime(todoItem.createdDate(), cal.calendarDefaultTimezone());
newItem.entryDate = createDate;
}

// Set due date
if(newItem.dueDate){
let dueDate = cal.dateTimeToJsDate(newItem.dueDate, cal.calendarDefaultTimezone());
let dateStr = this.makeDateStr(dueDate);
todoItem.setAddOn('due', dateStr);
}
}

newItem.id = todoItem.id();
Expand Down

0 comments on commit 32e69e6

Please sign in to comment.