kopia lustrzana https://github.com/magicbug/Cloudlog
datetimpicker dxatlas export (+bugfix)
rodzic
ad529175c1
commit
8d1457115a
|
@ -150,14 +150,10 @@ class Dxatlas_model extends CI_Model
|
||||||
|
|
||||||
// If date is set, we format the date and add it to the where-statement
|
// If date is set, we format the date and add it to the where-statement
|
||||||
if ($fromdate != "") {
|
if ($fromdate != "") {
|
||||||
$from = DateTime::createFromFormat('d/m/Y', $fromdate);
|
$sql .= " and date(COL_TIME_ON) >='" . $fromdate . "'";
|
||||||
$from = $from->format('Y-m-d');
|
|
||||||
$sql .= " and date(COL_TIME_ON) >='" . $from . "'";
|
|
||||||
}
|
}
|
||||||
if ($todate != "") {
|
if ($todate != "") {
|
||||||
$to = DateTime::createFromFormat('d/m/Y', $todate);
|
$sql .= " and date(COL_TIME_ON) <='" . $todate . "'";
|
||||||
$to = $to->format('Y-m-d');
|
|
||||||
$sql .= " and date(COL_TIME_ON) <='" . $to . "'";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql .= ' and station_profile.user_id = ' . $this->session->userdata('user_id');
|
$sql .= ' and station_profile.user_id = ' . $this->session->userdata('user_id');
|
||||||
|
|
|
@ -115,23 +115,13 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="mb-3 col-md-3">
|
<div class="mb-3 col-md-3">
|
||||||
<label for="datetimepicker1"><?php echo lang('gen_from_date') . ':'; ?></label>
|
<label for="fromdate"><?php echo lang('gen_from_date') . ": " ?></label>
|
||||||
<div class="exportdatepicker input-group date col-md-12" id="datetimepicker1" data-target-input="nearest">
|
<input name="fromdate" id="fromdate" type="date" class="form-control w-auto">
|
||||||
<input name="fromdate" type="text" placeholder="DD/MM/YYYY" class="form-control datetimepicker-input" data-bs-target="#datetimepicker1"/>
|
|
||||||
<div class="input-group-append" data-bs-target="#datetimepicker1" data-bs-toggle="datetimepicker">
|
|
||||||
<div class="input-group-text"><i class="fa fa-calendar"></i></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mb-3 col-md-3">
|
<div class="mb-3 col-md-3">
|
||||||
<label for="datetimepicker2"><?php echo lang('gen_to_date') . ':'; ?></label>
|
<label for="todate"><?php echo lang('gen_to_date') . ": " ?></label>
|
||||||
<div class="exportdatepicker input-group date col-md-12" id="datetimepicker2" data-target-input="nearest">
|
<input name="todate" id="todate" type="date" class="form-control w-auto">
|
||||||
<input name="todate" totype="text" placeholder="DD/MM/YYYY" class="form-control datetimepicker-input" data-bs-target="#datetimepicker2"/>
|
|
||||||
<div class="input-group-append" data-bs-target="#datetimepicker2" data-bs-toggle="datetimepicker">
|
|
||||||
<div class="input-group-text"><i class="fa fa-calendar"></i></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
|
|
Ładowanie…
Reference in New Issue