Avatar

Correct answer by
Level 10

FormCalc has a date function to get the day of the week.

// form1.page1.subform1.dayOfWeek::calculate - (FormCalc, client)

var date_ = Date2Num(date.formattedValue,"MM/DD/YYYY")
$ = Num2Date(date_,"EEE")

The pattern "EEE" returns the Mon, Tue, Wed, etcetera. You have to synch the date pattern on the DateTimeField ("date" in my case) with the script.

"dayOfTheWeek" could be a hidden field and you could reference the "dayOfTheWeek.rawValue" from your JavaScript.

Steve

View solution in original post