Dear Team, In the below code I have used the conditions for the restriction of the selection of the date and now I am facing the above issue please help me out.
<?php
$cdate = date('Y-m-d');
//$strMinDate = date("01-m-Y", strtotime("-12 month"));
//$strMaxDate = date('Y-m-t',strtotime($cdate));
$strMinDate = date('Y-m-01',strtotime("-12 month"));
$strMaxDate = date("Y-m-t", strtotime("last day of previous month"));
$strMaxDate1 = date("Y-m-t", strtotime("last day of previous month"));
DateTimePicker::create(array(
"name"=>"startDatePicker",
"minDate"=>$strMinDate,
"maxDate"=>$strMaxDate1,
//"value"=>date("01-m-Y", strtotime("first day of previous month")),
"format"=>"DD-MM-YYYY"
));?>
</div>
<div class="row" style="text-align:center;">
<div class="col-md-3 form-group" style="margin:auto 35%">
<?php DateTimePicker::create(array(
"name"=>"endDatePicker",
"minDate"=>$strMinDate,
"maxDate"=>$strMaxDate,
//"value"=>date("t-m-Y", strtotime("last day of previous month")),
"format"=>"DD-MM-YYYY"
));?>
Dear Team, I am facing an issue with DateTimePicker that is I have implemented the DateTimePicker with some conditions in my report and now the issue is when I am selecting the date from 1th march to 31 march I am able to retrieve the data and then I am selecting from 1 feb 2021 to 31th feb 2021 then also I am able to retrieve the data but again if I am selecting the date 1th march to 31th march 2021 then the end date is not changing.