Jquery Code
<link rel="stylesheet" href="assets/calender/jquery-ui.css">
<script src="assets/calender/jquery-ui.js"></script>
HTML Code
<form autocomplete="off" id="sendform" method="post" action="#" >
<div class="row" style="margin-top:7px;">
<div class="col-sm-2">
<div class="form-group">
<label > Start date of Month <font style="color:#ff0000;font-size:16px"> *</font> </label>
<input type="text" name="sdtgmt" id="sdtgmt" required class="form-control" >
</div>
</div>
</div>
<div class="row" style="margin-top:7px;">
<div class="col-sm-2">
<div class="form-group">
<label > End date of Month <font style="color:#ff0000;font-size:16px"> *</font> </label>
<input type="text" name="edtgmt" id="edtgmt" required class="form-control" >
</div>
</div>
</div>
<div class="row" style="margin-top:7px;">
<div class="col-sm-12">
<div class="form-group"><button type="submit" name="submit_row" value="Submit" class="btn btn-primary" ><i class="fa fa-align-justify"></i> SUBMIT</button></label>
</form>
PHP Code
if (isset($_POST['submit_row']))
{
$sdtgmt_x = $_POST['sdtgmt'];
$edtgmt_x = $_POST['sdtgmt'];
$sdtgmt = date("Y-m-d", strtotime($_POST['sdtgmt']));
$edtgmt = date("Y-m-d", strtotime($_POST['sdtgmt']));
echo "$sdtgmt";
echo "<br>";
echo "$edtgmt";
exit;
}
It is showing only mm-yyy but I want in post value as full date of start and end. For example if we have selected "Sep 2019" then it should show as sdtgmt - 2019-09-01 and edtgmt - 2019-09-30