<input type='text' value='foo' id='foo'>
<div id='bar'><p>bar</p></div>
<button onclick='concat()'>click me</button>
<script>
function concat() {
var foo = document.getElementById('foo').value;
var bar = document.getElementsByTagName('p')[0].innerHTML;
document.getElementById('bar').innerHTML = foo + bar;
}
</script>
$(document).ready(function(){
$(".book__btn").click( function () {
const datePicker = document.getElementById("datepicker").value;
const datePickerTime = document.getElementById("disableTimeRangesExample").value;
let datePic = (datePicker + ' ' + datePickerTime);
$(".book__btn").addClass('js-open-callback');
const datePicText = document.getElementById('popup-textarea').innerHTML = datePic;
datePicText();
});
});