Ann: Day of Month Picker

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.
Screenshot 2021-12-19 at 08.06.55

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.

6 Likes

Thank you @Beatrix_Willius

Wouldn’t you like to make the code available on GitHub? :slight_smile:

1 Like

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 .

1 Like

Nice.

“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.

Hello Beatrix
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
Happy Holiday

https://www.dropbox.com/s/39yl645mar4suyq/meineTageswahl.xojo_binary_project?dl=1

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
https://www.dropbox.com/sh/9q0gucw8ifvb920/AAAJslFWdZy5m_4RqRrOogdaa?dl=1