Scriptable Date Picker in Shortcut

Hi there, I’m trying to get the output of Scriptable’s date picker to appear in my shortcut, but currently I’m just getting an empty result.

Here’s a link to my shortcut currently:

And here’s the code snippet I’m trying to use in Scriptable. I’m not really sure why it’s not working.

pick = new DatePicker()

test = pick.pickDateAndTime()
  new CallbackURL("shortcuts://").open();
  return val

I’ve also tried using Script.setShortcutOutput, with no luck.

Please let me know if anyone has any suggestions for getting this working.

Given the date picker can’t be used from an inline script, here’s one approach based on what you had above.

Date Picker

dpPicker = new DatePicker();
dtTime = await dpPicker.pickDateAndTime();
new CallbackURL("shortcuts://").open();


Hope that helps.

Thank you, that works perfectly. And sorry for the late reply. Appreciate your help!