i want to set default dates for RateRangePicker from yesterday to today, below is my code to have it but when set $yday as below it is showing "1969-12-31" and for $today it is showing correct date of today. please guide how i can set correct yesterday's date as "2023-01-18".
protected function defaultParamValues()
{
$today = date("Y-m-d");
$yday = date("Y-m-d", -1);
return array(
// "dateRange"=>array(date("2022-12-01"),date("2022-12-01")),
"dateRange"=>array($yday,$today),
"customers"=>NULL,
);
}
.view.php
DateRangePicker::create(array(
"name"=>"dateRange",
"format"=>"YYYY-MM-DD",
"timeZone" => "ZZ"
))
regards