Web Automation(Issue regarding to set date)

I am working on one process which is related to web application, in that I have to set Today’s date and yesterday’ date, for that I made variables of today’s date and for previous date and set that variable on date textbox but at runtime it throws error like – invalid element state (session info chrome: 90.0) Also I am not able to enter date value manually on that text box, it is accepting only clicks but I have to make it dynamic so how can I achieve this, please help me to resolve this error
I have attached image of calendar
CalenderImage
on which I have to set date

Hi @geet

Try using Execute JavaScript to set the date in the input field. The logic to set custom date based on click would be difficult to implement.

Make sure you give some delay after executing the Javascript.

Examle -
HTML

<input type="text" id="datepicker">

Java Script

var $datepicker = $('#datepicker');
$datepicker.datepicker();
$datepicker.datepicker('setDate', new Date());

Hi @geet
Try to reconfigure selectors. Select Find By value as manual and select attribute (which contain date value) and assign argument (which contain todays date). This will select date at run time.

Regards,
Bhuvan