11-27-2018, 05:40 PM
Hello QM Forum,
I'm working on building out a simple calendar app that auto populates the days of the week based on the current month and the day. It's a very basic dialog with buttons as placeholders for the calendar. There are 35 in total; 7 columns and 5 rows. The idea I had initially was to find out the current day of the week and do some math to count forwards and/or backwards to fill in the rest of the dates in the proper order. While I think this can work with some finessing, I was curious if there is a more simple way to determine the initial starting day of the week for the 1st of the current month.
For example, November 1st is on Thursday, December 1st is on Saturday, etc. I know this can be done manually, but I'd like the option for the days to auto populate for future use.
I'm working on building out a simple calendar app that auto populates the days of the week based on the current month and the day. It's a very basic dialog with buttons as placeholders for the calendar. There are 35 in total; 7 columns and 5 rows. The idea I had initially was to find out the current day of the week and do some math to count forwards and/or backwards to fill in the rest of the dates in the proper order. While I think this can work with some finessing, I was curious if there is a more simple way to determine the initial starting day of the week for the 1st of the current month.
For example, November 1st is on Thursday, December 1st is on Saturday, etc. I know this can be done manually, but I'd like the option for the days to auto populate for future use.