Read the statement by Michael Teeuw here.
Microsoft To-Do (wunderlist replacement?)
-
@wazzu Excellent worked a treat… ToDo didn’t like the link (List not Found) but when it returned to screen the list had the long ID. I amended the config file and worked like a charm… Thanks G
-
@andyyy The call seems to be missing some parameters, please check the full command line from https://github.com/thobach/MMM-MicrosoftToDo/blob/master/README.MD, thanks!
-
@zolabus It seems you faced the same issue as in https://github.com/thobach/MMM-MicrosoftToDo/issues/18. I updated the instructions in https://github.com/thobach/MMM-MicrosoftToDo/blob/master/README.MD#refresh-token-generation-refresh-token to be more Windows friendly, e.g. all in a single line and using double quotes. Could you please try it again with the updated instructions? Thanks!
-
@thobach: Do you have recommendations to get the due date to show? I have tried to add
element.dueDateTime.dateTime
in the MMM-MicrosoftToDo.js like I have in the past, but now the module won’t show with that that. And no matter how I try to format it withmoment
it still doesn’t like it. I tried it with the simpleelement.id
to see if that would show and it does show the todo ID. Thoughts? I know I am missing something simple. Thanks! -
@smoysauce if your element does not have a dueDateTime (null) this could lead to an error (cannot get property of undefined).
Maybe something like this?
if (element.dueDateTime) { var dueDate = moment(element.dueDateTime.dateTime).format("LL"); }
-
@lavolp3 Oh good call-out! I tried your example as well as a few other tweaks but it doesn’t seem to like it when I add that snippet in. I don’t know why it’s being so weird. I’ll keep toying around with it, but any other thoughts would be appreciated!
-
@lavolp3 said in Microsoft To-Do (wunderlist replacement?):
if (element.dueDateTime) {
var dueDate = moment(element.dueDateTime.dateTime).format(“LL”);
}So after some tinkering, I figured out that the node.js was not pulling in the due date so I removed the ‘select’ filter so the call URL has
'/tasks?$top='
After that, I was able to add
moment(new Date(element.dueDateTime.dateTime)).format("ddd MMM DD")
to the output string and got the date to show. But for the life of me, I cannot get thevar
orif
statements to work. If I try to use either the module doesn’t load. I have tried them in all different spots and it just doesn’t like it. -
@smoysauce
First,moment(new Date(element.dueDateTime.dateTime)).format("ddd MMM DD")
is redundant. You don’t need thenew Date
part.
moment(element.dueDateTime.dateTime).format("ddd MMM DD")
should be enough.Second, where have you put it?
I had my own problems with the code, that’s why I’m working on an own version including due dates, but it’s not finished.Here’s how I would try to include it.
if (this.list.length !== 0) { this.list.forEach(element => (listItemsText += '<li style="list-style-position:inside; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;">' + checkbox + element.subject + ((element.dueDate) ? moment(element.dueDateTime.dateTime).format("ddd MMM DD") : '') + '</li>')) } else { // otherwise indicate that there are no list entries listItemsText += '<li style="list-style-position:inside; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;">' + this.translate('NO_ENTRIES') + '</li>' }
-
@lavolp3 said in Microsoft To-Do (wunderlist replacement?):
if (this.list.length !== 0) {
this.list.forEach(element => (listItemsText += ‘- ’ + checkbox + element.subject + ((element.dueDate) ? moment(element.dueDateTime.dateTime).format(“ddd MMM DD”) : ‘’) + ‘
’))
} else {
// otherwise indicate that there are no list entries
listItemsText += ‘- ’ + this.translate(‘NO_ENTRIES’) + ‘
’
}Thanks for pointing that out, I am still figuring things out and piecing things together and if they work I just stick with it! That snippet worked, I had to change the section
element.dueDate
toelement.dueDateTime
but other than that seems to be doing the trick. I’ll probably toy around with it a bit more to see if I can learn formatting it with CSS to left align the subject and right align the date. Thanks for the help and tips! -
@thobach thanks for your effort. Just got this up and running from your instructions in the README. Very pleased. :thumbs_up: