How to load data in control after using Invoke JS

Dear All,

I am using Invoke JS to set the calendar date because I cant use type into activity on it (cant copy and paste the date)
so whenever I set the date on calendar control by Invoke JS the label control should load the pallets as in picture below
but the label control unable to load the data based on the Calendar control date.
please help may be i am missing some event to fire using Invoke JS

following is the code

  1. document.getElementsByClassName(‘react-datepicker__input-container’)[0].firstElementChild.value=“22-04-2024”

  2. div class=“react-datepicker-wrapper”>
    div class=“react-datepicker__input-container”>
    input type=“text” placeholder=“DD-MM-YYYY” class=“” value=“22-04-2024”>
    /div>
    /div

image

@Mohsin_Ali_Mohammed

This is basically what set text does…try to use set text also…

And if there is any script getting triggered on click then these methods might jot work.:

Also if you need to do through clicks can check thsi example

Cheers

Dear @Anil_G
thank you.

Set text is not working.
i can able to change the date by using "
document.getElementsByClassName(‘react-datepicker__input-container’)[0].firstElementChild.value=‘24-04-2024’
but whenever date changes other control on website load data which is not working.

if i change the date manually the other control on website data loading properly.

@Mohsin_Ali_Mohammed

Thats because it is expecting a change somewhere else or a click

Check the link

Cheers

can you please mention which link?

@Mohsin_Ali_Mohammed

The link I pasted in my previous reply…

Cheers

Dear @Anil_G ,

I tried a lot but I able to change the Date using Invoke JS in Date picker but I can’t fire the event to load the data on the other control anyhow I want to use another way to pick up the date using mouse click

so I am use the following steps

  1. Clicking the Date picker to pop up
  2. selecting the date for current month (working fine)
  3. for selecting the date for next month I am using the while loop
    inside while loop i am using try catch block
    the problem is in try block i am getting following error and control not moving to catch block to click next month
    can you please help why control not moving to catch block to click icon for next month

@Mohsin_Ali_Mohammed

What did you give in the catch block?

Can you show some screenshots ans also what is implemented and where exactly you are getting error

Cheers

@Anil_G
now it is working fine if I click Run file instead of debug file

below is catch

@Mohsin_Ali_Mohammed

Debug file will not stop…by default if we do debug ehen a error occurs it would pause there if you click continue it would go to the catch block

This is a functionality of debug

Cheers

@Anil_G
Thank a lot.
sometimes everything working fine but some time i am getting error as
Cannot send input to UI element because it is outside of screen bounds

@Mohsin_Ali_Mohammed

Then try using simulate option in the properties panel

Cheers