I'm looking to create a select (dropdown) form field that includes the days and dates for the next 14 days, starting from today, as options.
My initial thoughts on how to construct this would be to set today {% set today = now|date("l dS F Y") %}
and then set a date 13 days from now {% set finalDate = now|date_modify("+13 day")|date("l dS F Y") %}
and then somehow put that into a range loop. It is the last part I'm having trouble getting working, if it is at all possible.
Once I have that range I would ultimately like to pass it as option values to the select macro mentioned in another question like so:
{{ forms.select({
options: ['Today', 'Tomorrow', ...]
}) }}
Thanks