Hi, When I use the calendar example provided the server replies : POST [HTTP/1.1 500 Internal Server Error 45ms]
Thank you for your help, CL
Pagamento2.php
<?php
require_once "koolreport/core/autoload.php";
use \koolreport\KoolReport;
use \koolreport\processes\Group;
use \koolreport\processes\Sort;
use \koolreport\processes\Limit;
use \koolreport\inputs\DateTimePicker;
class Pagamento2 extends \koolreport\KoolReport
{
use \koolreport\inputs\Bindable;
use \koolreport\inputs\POSTBinding;
use \koolreport\clients\Bootstrap;
protected function defaultParamValues()
{
return array(
"startDatePicker"=>date("Y-m-d"),
);
}
protected function bindParamsToInputs()
{
return array(
"startDatePicker",
);
}
public function settings()
{
return array(
"dataSources"=>array(
// blanked
)
)
);
}
public function setup()
{
$this->src("controleDB")
->query("
// blanekd
->pipe($this->dataStore("Facturas"));
}
}
$pagamento = new Pagamento2;
$pagamento->run()->render();
Pagamento2.view.php
<html>
<head>
<title></title>
</head>
<body>
<?php
use \koolreport\inputs\DateTimePicker;
use \koolreport\widgets\koolphp\Table;
?>
<div class="report-content">
<div class="text-center">
<h1>Facturas a pagamento</h1>
</div>
<form method="post">
<div class="row">
<div class="col-md-3">
<strong>DateTimePicker</strong>
</div>
<div class="col-md-6">
From Date:
<?php
DateTimePicker::create(array(
"name"=>"startDatePicker",
// "maxDate"=>"@endDatePicker",
"format"=>"MM/DD/YYYY",
"themeBase"=>"bs4",
));
?>
</div>
</div>
<div class="form-group" style="margin-top:30px;">
<button class="btn btn-lg btn-primary">Submit form</button>
</div>
<p class="form-group">
<i>* Please try to change form and submit, you will see the form
values are persistent through form post. Below are values that archived from <code>$params</code>
</i>
</p>
<pre><code><?php echo json_encode($this->params,JSON_PRETTY_PRINT) ?></code></pre>
</form>
</div>
</body>
</html>