Is there a way to have a button to set date and time into a field

114 views
Skip to first unread message

Shash

unread,
Apr 22, 2015, 10:23:20 AM4/22/15
to tiddl...@googlegroups.com
Hi all,

I have a group of tasks as tiddlers. I am trying to capture the date and time for each of the tasks (after they are complete) by adding a button. So once I press the button I want the current date and time to be in added into a field. 

Can you please help me on this. 

Thanks!

Mark Brown

unread,
Apr 23, 2015, 4:46:40 AM4/23/15
to tiddl...@googlegroups.com

Shash

unread,
Apr 23, 2015, 5:23:12 AM4/23/15
to tiddl...@googlegroups.com
Hi


On Thursday, April 23, 2015 at 2:16:40 PM UTC+5:30, Mark Brown wrote:

Yes Thanks. It does help. But how to use it to update a field in the tiddler with this button?
 
cheers

mark

On Thursday, 23 April 2015 00:23:20 UTC+10, Shash wrote:
Hi all,

I have a group of tasks as tiddlers. I am trying to capture the date and time for each of the tasks (after they are complete) by adding a button. So once I press the button I want the current date and time to be in added into a field. 

Can you please help me on this. 

Thanks!

Thanks!
Shash 

Eric Shulman

unread,
Apr 23, 2015, 5:31:54 AM4/23/15
to tiddl...@googlegroups.com
On Thursday, April 23, 2015 at 2:23:12 AM UTC-7, Shash wrote:
On Thursday, April 23, 2015 at 2:16:40 PM UTC+5:30, Mark Brown wrote:

Yes Thanks. It does help. But how to use it to update a field in the tiddler with this button

Use the <$action-setfield> widget, like this:

<$button>
   <$action-setfield timestamp=<<now "YY.0MM.0DD.0hh0mm0ss">>/>
   click me!
</$button> 

"timestamp" is the target fieldname in the current tiddler and "YY.0MM.0DD.0hh0mm0ss" is the date format to save.  You can change these to suit your specific purposes.  If you want to write a field in a tiddler other than the current tiddler, add $tiddler="NameOfTiddler" as another parameter of the <$action-setfield> widget.

enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios

YOUR DONATIONS ARE VERY IMPORTANT!
HELP ME TO HELP YOU - MAKE A CONTRIBUTION TO MY "TIP JAR"...


Reply all
Reply to author
Forward
0 new messages