Day of Month Picker allows you to pick a single day of a month.
From the Readme:
Copy all the folder Picker to your project. Drag the container DayOfMonthPicker to a window.
When a day is clicked the DaySelected event occurs. It’s possible to set the day with the SetDay method of the container.
The picker has been modelled after the DateControl plugin from Einhugur. Therefore, there are no options to control the look.
Code has been tested with Xojo 2021r2 and r3 on macOS High Sierra and Monterey. No plugins are used.
Each day is a container which has a canvas. With this the drawing is local. The parent container uses embedwithin to embed the days. Because the embedwithin doesn’t give events a delegate is used.
Thank you @Beatrix_Willius
Wouldn’t you like to make the code available on GitHub?
Me stupid. I didn’t get the screenshot uploaded and forgot to add the link to the download. The code is available at Xojo + Alfred .
“Choose a number between 1 and 31”.
This recalls me my first AppleSoft programming days… (with a far better interface).
What if the user wants to pick “Last day of Month”?
Then the user should select the 31. Date math is so not fun.
I had already created a daily picker with my old programming method that is very similar to yours but allows a month and a turn of the year.
I looked at your modern programming style, but I realized that I still lack a lot of knowledge about this type of programming.
So I do a lot on foot - but I also get to my destination
Here is another attempt by a booking program to reserve a period for a hotel room
which shows an overview of the year and the selection is also cross-month