Input only month and year in form

Hello, is there any way to input in a form type view only the month and the year instead of the date like dd/mm/yyyy?

For example, let the user pick January, 2023 or February 2024, instead of a date.

 

Regards,

 

Federico.

 

Solved Solved
0 1 3,533
1 ACCEPTED SOLUTION

I believe there is no calendar widget to select only month and year. There could be few workarounds. However, it may not be either very intuitive for the user for data entry or not a very straightforward data capture to implement.

1. You could have two enums- one for years ( assuming years are within a finite range say from 1950 to 2050 and so on) and another for 12 months. If you wish to use this date entry in any date based calculations, you may need another column to convert these enum columns  to proper date format.

2. If number of years is really small, say from 2023 to 2030, you could create a lookup table with a column with  values such as January-2023, February-2023......December-2023,......January-2030, February-2030...., December-2030.  Such a column may have 100-200 records depending on number of years. Again, if you are using this data entry further in date based calculations, you may need another column to do those calculations.

3. The user could use the default calendar widget and select any date of the month once she/he has selected the year and month. The app could convert it to month and year and display it in detail and summary views.

There could be some such alternatives. 

View solution in original post

1 REPLY 1

I believe there is no calendar widget to select only month and year. There could be few workarounds. However, it may not be either very intuitive for the user for data entry or not a very straightforward data capture to implement.

1. You could have two enums- one for years ( assuming years are within a finite range say from 1950 to 2050 and so on) and another for 12 months. If you wish to use this date entry in any date based calculations, you may need another column to convert these enum columns  to proper date format.

2. If number of years is really small, say from 2023 to 2030, you could create a lookup table with a column with  values such as January-2023, February-2023......December-2023,......January-2030, February-2030...., December-2030.  Such a column may have 100-200 records depending on number of years. Again, if you are using this data entry further in date based calculations, you may need another column to do those calculations.

3. The user could use the default calendar widget and select any date of the month once she/he has selected the year and month. The app could convert it to month and year and display it in detail and summary views.

There could be some such alternatives.