Hi @BCBuizer ,
I finally figured out the logic and my app is working perfectly. First I inserted two dropdowns one for year and another of month named Dropdown1 and Dropdown2 respectively.
For Dropdwn1 the properties I set were - Items : [2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021,2022,2023,2024,2025,2026,2027,2028,2029,2030]
Default : Year(varFirstDayOfMonth),
Onchange : Set(varFirstDayOfMonth,
Date(
Self.Selected.Value,
Month(varFirstDayOfMonth),
1
)
) Similarly for month dropdown i.e. Dropdown2 - Items : Used collection on appOnStart for this - ClearCollect(colMonths,{month:"Jan",value:1},{month:"Feb",value:2},{month:"Mar",value:3},{month:"Apr",value:4},{month:"May",value:5},{month:"Jun",value:6},{month:"Jul",value:7},{month:"Aug",value:8},{month:"Sep",value:9},{month:"Oct",value:10},{month:"Nov",value:11},{month:"Dec",value:12})
Default - LookUp(colMonths,value=Month(varFirstDayOfMonth)).month
Onchange - Set(varFirstDayOfMonth,
Date(
Year(varFirstDayOfMonth),
Self.Selected.value,
1
)
) Also, i had to change the OnSelect properties for previous and next arrows to - Set(varFirstDayOfMonth,
Date(
Year(varFirstDayOfMonth),
Month(varFirstDayOfMonth)-1,
1
)
);Reset(Dropdown1);Reset(Dropdown2),
- Set(varFirstDayOfMonth,
Date(
Year(varFirstDayOfMonth),
Month(varFirstDayOfMonth)+1,
1
)
);Reset(Dropdown1);Reset(Dropdown2)
and finally the OnSelect property of the button which shows Today's text
as - Set(varFirstDayOfMonth,
Date(
Year(Today()),
Month(Today()),
1
)
);
Reset(Dropdown1);Reset(Dropdown2)
By making these changes now I can select the month and year from the dropdown and easily show the appropriate days in the calendar based on the selection from dropdowns. Also by wiring the header label which shows the name of year and month and the previous & next arrows.
