While working on a shortcut to allow me to reschedule a bunch of work related reminders to a specific day in the near future, I became frustrated with the default Shortcuts date picker.
I find the spinning wheels annoying and the lack of a day of the week indicator makes it difficult to select a date of say “next Thursday” without reference to a calendar.
This led me to create a Relative Date Picker shortcut that presents the interface shown below and allows near dates to be selected with a single tap.
I’ve shared the shortcut here in case others should find it useful.
It is designed as a utility to be called from other shortcuts so I’ve also uploaded a couple of calling examples.
The first simply uses the Relative Date Picker with its default settings.
The second uses an optional input dictionary to configure the following…
- Menu prompt
- Base date for the picker
- Number of days to show
A few highlights of the implementation details…
- The menu is created as a list of contacts, as this seems to be the only way to get a nice looking menu natively in Shortcuts without calling out to another app (which I was trying to avoid as it often seems to cause issues when running in a widget).
- The graphics were created in OmniGraffle, exported as PNG files with transparent backgrounds and Base64 encoded using another shortcut before being embedded in a dictionary.
- The shortcut calls itself in order to implement the “Earlier” and "Later’ functions (as a result if you rename it you also need to change the “Shortcut Name” entry in the config dictionary near the top of the shortcut).