I have an app using a calendar from Ant Design.
The date picker seems to be a read only attribute. I need to interact with this element from Selenium in Python.
To get around it, I tried the following code:
self.driver.execute_script("document.querySelector('.ant-calendar-picker-input.ant-input').readOnly = false")
self.driver.execute_script("document.querySelector('.ant-calendar-picker-input.ant-input').value ='12-12-2021'")
self.driver.execute_script("document.querySelector('.ant-calendar-picker-input.ant-input').readOnly = true")
With this code the date does not get updated (it does change on the UI, but the date HTML attribute is empty). What am I doing wrong?
Here are screenshots of the HTML code:
After the date gets updated (manually):

Thanks