php - Check that an input date is set without a submit button? -
is possible check input type date set without submit button. i.e if done through mobile browser there set button when first click on date input field there way check "set" button clicked , desktop view calendar when user clicks on date same button, there way check has been clicked without submit button?
image example:
normally check using submit button, this:
if (isset($_get['date'])){ $date = $_post['datevalue']; if (empty($date)) { //if date not set... } else{ //if date set... } }
thanks guys, been struggling while now.
why not let html handle it?
<input type ="date" required>
forms wont submit unless input type required
attribute not empty
Comments
Post a Comment