Issue with JavaScript Custom code and assigning dates

  • 27 June 2017
  • 1 reply
  • 4 views

Badge +1

Hello,

Hope someone can help out with this as we have been experiencing problems.

We currently have a form that has several date fields that should populate with a date once a separate Status value is assigned.

We are using the JavaScript shown in the attachment. The script should allow us to submit the form and depending on the Status assigned, Populate the associated date value in the form with (todays) date

The first assigned value will set the date today as expected.

 

The issue seem specifically around setting the value on the data field

val(currentDate)

 

This is not happening. It seems to not allow us to submit a value after the initial status is assigned. The date fields do not populate with the (Today) date as expected.

 

 Has anyone experience this and can help find a solution?

 

Thanks

 

Dave Stuart


1 reply

Userlevel 6
Badge +16

try

NWF$("#" +workInProgressDate).val(currentDate);

Reply