Believe it or not, you already have the solution for both this problem and another one hiding after that.
Details
- What Leo explained: your function
getString
is undefined, you need to reference it from its origin like so:
var date = clickData.func.Dlg.getString("Enter date:");
- Bonus problem waiting for you: after the user-cancel check (
if (!date) return
which you already have), but before thefor
loop you need to convert thestring
date to an Opus'Date
object, so you need this:
date = DOpus.Create().Date(date);
(otherwise thedate.Format
call you have below would fail).