Add date when marked as done for journalling purposes
erwanm opened this issue · comments
- also allow user to choose the date the task was done
Added done.date field and button to modify this field when the todo is marked as done.
Left to do: ui to mark as done with selection of a date, probably as an action in the '...' button? Also add a way in the tiddler itself.
This is trickier than expected:
- implemented option 'done ...' in the '...' actions menu which allows the user to select the 'done date'.
- However the 'py-mark-as-done' macro cannot be called from the pickaday widget, so it needs to be called when the button is clicked I guess
- I tried to do this but todo is not marked as done, I don't know why. I suspect some inconsistent state with the popups?
After fixing the issue of the wrong macro name being called when the user clicks 'done ...', observed that the behaviour is completely wrong because the popup disappears and the todo is marked as done with current date.
This means that it is really necessary to make the click in the pickaday calendar trigger the py-mark-as-done
macro, i.e. in the JS module call a macro given as parameter.
I solved this one thanks to BuggyJ, see https://talk.tiddlywiki.org/t/calling-a-tw-macro-from-a-js-widget/9342/5