Bug - disabled datetime

I think there’s a bug in the date/datetime pickers.

If I disable a datepicker, a user shouldn’t be able to change that date. If I hover over the date displayed, then I get the ‘don’t touch this’ icon. But, if I hover over the actual calendar icon, I can still click on that and select a new date, changing the value of the date picker and generating a change event. Demo here:

https://anvil.works/build#clone:MWGG2YK6XLDIJ7OP=KZEKAL2HHYJL7EMX6SJZKPV5

Expected behavior is that that icon is also disabled by disabling the component.

7 Likes

Hi @danbolinson,

Thanks for raising this and creating a very clear app demonstrating the bug. I’ve added this to our list.

2 Likes

Expanding on the current behavior; Even though the ‘don’t touch this’ icon appears, clicking on the text a second time allows the user to edit it (in addition to being able to change it using the drop down).

Also, setting the max and min date range is not used as a constraint when text is entered. So, setting the max and min to the current date value still does not prevent the user from changing the value of the disabled date-picker.