Clock Timer between Two Times

I’ve created a form for aptitude test.
I want to insert a clock timer in a form as time limitation for test,
i have three fields, named “start_time” , “end_time” , “remaining_time”,
i want start time should be current time,
and end time should be one hour later from start time,
and remaining time should show the clock in reverse order for 1 hours, as normal remaining time shows in any online examinations.
Can anyone help me out to achieve this?

Hi @shahid,

I think something like this could solve your case:

Instead of the expired notice, consider triggering a save/submit event…

@lasalesi thanks i’ll try & let you know the result.

But how can i add one hour into End Time field based on Start Time?

var today = new Date();
today.setHours(today.getHours() + 1);

I tried this but not working.

	var today = frm.doc.start_time;
	var res = today.setHours(today.getHours() + 1);
	frm.set_value("end_time", res);

With new Date(); instead of frm.doc.start_time it is giving the garbage value.
with frm.doc.start_time it is giving the current time in end time as usual.