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
getStringis 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) returnwhich you already have), but before theforloop you need to convert thestringdate to an Opus'Dateobject, so you need this:
date = DOpus.Create().Date(date);(otherwise thedate.Formatcall you have below would fail).