Jump to content
  • 0

Updating records in numerous date fields



Hello. Hope someone can assist. Totally new to javascript and the platform and testing out the platform for future projects since I saw that this is supposed to be no coding involved :mellow:. However, I have trouble working with the date time entries since there I do not know how the users of my dataform can input separately the time and date.

I need the dataform to retrieve existing records through search button, show the existing record, and allow the user to update that record which contains activities, their start date with time and end date with time, compute the duration between the two time per activity. 

After clicking the update button, the date and time entries are concatenated and shown as display only with the virtual field for the Date Hour and Minutes cleared up.

Been toying with the script below I copied from somewhere else to no avail. Hoping for your assistance.





document.getElementsById('Mod0EditRecord').onclick = function(){

var date =
if(date == "")
date = "1/1/2011";

var hour = parseFloat(document.getElementById('cbParamVirtual2').value;
if(hour == "")
hour = "00";

var minute = document.getElementById('cbParamVirtual3').value;
if(minute == "")
minute = "00";

document.getElementById('EditRecordTime_Start_Act1').value = date + " " + hour +":"+ minute;

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...