How to open datepicker on button click and display the date in a textbox

How to open datepicker on button click and display the date in a textbox

Hi All,

I am using daterange picker. I want to open the daterange picker on button click and display the selected range in a textbox. Any help??