Pass date time in mm/dd/yy hh:mm:ss format from iol js script

  • 0
  • 1
  • Question
  • Updated 12 months ago
  • (Edited)
I have the below code in my iol java script page and it works for what I need. The problem is _fid_18 shows the time as a string of numbers on the form and not as dd/mm/yyyy hh:mm:ss until after the form is saved. Once the form is saved it displays in the proper format. I am looking at for a way to format the date in the java script page but so far everything I try breaks the script. Can anyone help me out with this?

  $("a.QBU_Button").on("click", function(event) {
    new Promise((resolve, reject) => {
      navigator.geolocation.getCurrentPosition(resolve, reject);
    }).then(position => {
      _fid_37.value = position.coords.latitude;
      _fid_38.value = position.coords.longitude;
     _fid_18.value = new Date().getTime() - 14400000


Photo of Jason Rake

Jason Rake

  • 214 Points 100 badge 2x thumb
  • Unsure

Posted 12 months ago

  • 0
  • 1

There are no replies.