Hi folks!
While still learning TW in small steps, I am "developping" my own todo list
… and ran into a problem: When a task is done, I want to write the
done-date in it’s own field.
Within the list of tasks I tried:
<$set name="donedate" value=<<teTimestampNow>> >
<$macrocall $name="todoBtnDone" remove="ToDoNow" date=<<donedate>>/>
</$set>
with these macros:
\define todoBtnDone(remove, date)
<$fieldmangler>
<$button tooltip="This is done" class="todo-btn-invisible" message=
"tm-remove-tag" param="$remove$">
<$action-sendmessage $message="tm-add-tag" $param="ToDoDone"/>
<$action-setfield $field="todo-done" $value="$date$"/>
{{$:/core/images/full-screen-button}}
</$button>
</$fieldmangler>
\end
\define teTimestampNow()
<$set name="timestamp" value=<<now YYYY0MM0DD0hh0mm0ss>> >
<<timestamp>>000
</$set>
\end
Problem: I can see the button (the button works actually and adds/removes
tags as expected), BUT the output contains this as text output:
<$action-setfield $field="todo-done" $value="
20160818095228
000
"/>
... so it is not executed.
I am sure I did something wrong with the variable values <<donedate>> and
or $date$ – but I can’t see it at the moment. Maybe you can? Or is there a
better way to get a timestamp in the same format as standard modified and
created? Do I hav to use JS and $tw.utils.stringifyDate(now)); for this?
Kind regards, Thomas
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/270b9ca5-9c7c-43ff-910e-06cd5a852f63%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.