You are viewing limited content. For full access, please sign in.

Question

Question

Current date and time as table row label

asked on March 13, 2017

Hi there,

 

Is it possible (via css or javasript maybe) to use the current date and time as table row label(s)?

 

 

Any idea would be greatly appreciated. Thank you.

0 0

Answer

SELECTED ANSWER
replied on March 15, 2017

Hi Marlon,

You could use moment (already referred in submit page, reference https://momentjs.com/ ) to get current date/time, and set table label like this:

var current_date = moment().format('MMMM Do YYYY, h:mm:ss a');
$('#q4 tbody .col0').text(current_date);

And if you want to keep the same label on submitted form, you could save the date into a field, hide the field, and use the field value to populate the label.

0 0

Replies

replied on March 15, 2017

Just what I needed Rui, thank you!

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.