Firstly, if you ask a question about how to use the button to start your own date selection, you can do this by calling focus on it, for example:
<input id="datepicker" type="date"> <button onclick="document.getElementById('datepicker').focus()"></button>
If it hides the date picker, but still uses it with a button, you can put the opacity at 0 with CSS, but it will still be there, just not visible:
#datepicker { opacity: 0; }
Does this answer your question?
source share