Help with Calendar Component

I have an application where the user can see CIP run data for an entire week by clicking on the Sunday of the week they wish to view. What the customer does not like is the other 6 days being displayed which have no use.
what i really need is just the calendar component to be displayed with Sunday only so the customer can select which Sunday they wish to be the start of the weekly data.

is there any way to manipulate the calendar component to NOT display Monday - Saturday ?

If not I guess i will have to create a drop down with the most current Sunday and go back 52 weeks.

Iā€™m not sure if the calendar can be hacked to do that but it is rather simple to get just Sundays with Python.

from datetime import date, timedelta
def allsundays(year):
   d = date(year, 1, 1)                    # January 1st
   d += timedelta(days = 6 - d.weekday())  # First Sunday
   while d.year == year:
      yield d
      d += timedelta(days = 7)

for d in allsundays(2018):
   print d

You could create a button template that displays the date fed to it, then use a template repeater to load them up as buttons.

1 Like

Something like this :slight_smile:
SundayFun.proj (26.4 KB)