I have been using the Date Picker to great effect but I want to restrict the years available to say, 2015 through to 2022 and therefore not have, for example, 2004 available.
I understand that the way to do this would be to select Show Dropdowns and use the Min Year and Max Year fields, but I can’t get it to work. I have tried with dates such as 2015 and 2022, I have also tried -3 and 3 but nothing works. What is the correct thing to put into these fields?
Is there also a way to do it dynamically, for instance, 3 years before and 3 years after today’s date?
Try to find that static years, like „2016“ and just put data binding there. Maybe you must create on another place that data binding so you can see it first and cut & paste it over the static year
But the drop-down year selector still shows years going back to 1919. I want the option to be restricted to, say, 5 years going forward and 2 years going back.
@George still not working.
I have this Date and Time component as mentioned before.
I have followed George’s suggestion as follows
The Values are DateAndTimeInDays.datetime.addYears(-2) DateAndTimeInDays.datetime.addYears(4)
(typed here because they don’t show in full on the screenshots)
And the “Value” dd_user.data.date_modified is from the database.
Hello @UKRiggers,
Yes i have checked that and we found the problem. There was a small typo in the code, which will be fixed in the upcoming Wappler update.