How to open an attachment based on the date picker

I did it! In the end, I used the standard $_REQUEST and $_GET to store and fetch the value in the date-picker instead of all the fancy hooks and filters.

The only thing I am not able to fathom out is the deal with input type-button. It was not storing the value in $_REQUEST. But when I used input type-text, it was all too easy. I don’t understand what input type-button is for if it cannot even store a value.
If someone can explain it to me, it would be awesome!