How to set value to primeng datepicker and dropdown using vanilla javascript

I tried to set value using javascript and i also see the selected index value which I gave but when I tried to trigger the event using dispatchEvent it doesn't works For p-calender I'm not able to set date value Please give me some solution Thanks in advance

select the dropdown option

document.querySelector("p-dropdown[formcontrolname='secque']").getElementsByTagName("select")[0].options[1].selected = true

check selected option

document.querySelector("p-dropdown[formcontrolname='secque']").getElementsByTagName("select")[0].selectedOptions

to trigger event

document.querySelector("p-dropdown[formcontrolname='secque']").getElementsByTagName("select")[0].dispatchEvent(new Event('change',{ bubbles: true }))

document.querySelector("p-dropdown[formcontrolname='secque']").getElementsByTagName("select")[0].dispatchEvent(new Event('change'))

also tried with same with event "select" , "input"

for datepicker

document.querySelector("p-calendar[formcontrolname='dob']").getElementsByTagName("input")[0].value="24-01-1995"