How to input a year on a form?

I’m aiming to allow the user to input just a year as a field in a form without the day / month. I’ve tried looking at the ‘Date’ field type; however the only way I can see of modifying this to fit my requirement would be to change all date formats to YYYY system wide which obviously isn’t ideal.

Does anyone have a suggestion of a better way to approach this?

@Gallahron you can use select field and write few dozens of last years as options

1 Like

in erpnext mostly for this the Doctype “Fiscal Year” is used. It is then linked into other doctypes. This will make sure, that when you add years they are added in all years. If you use select as bahaou suggested you will need to remember where you have used these fields and update everywhere when adding new years.

in frappe there is no such field. In The Doctype Company History you will see that the field year is just a simple data field.

In my case I have used a int field type to be able to have access to these filters which will be helpful in this scenario