|
|
@@ -127,15 +127,16 @@ class Between extends Filter
|
|
|
$options = json_encode($options);
|
|
|
|
|
|
Admin::script(<<<JS
|
|
|
- $('.{$this->class['start']},.{$this->class['end']}').datetimepicker({$options});
|
|
|
- $(".{$this->class['start']}").on("dp.change", function (e) {
|
|
|
- $('.{$this->class['end']}').data("DateTimePicker").minDate(e.date);
|
|
|
- });
|
|
|
- $(".{$this->class['end']}").on("dp.change", function (e) {
|
|
|
- $('.{$this->class['start']}').data("DateTimePicker").maxDate(e.date);
|
|
|
- });
|
|
|
+ $('.{$this->class['start']}').datetimepicker($options);
|
|
|
+ $('.{$this->class['end']}').datetimepicker($options);
|
|
|
JS
|
|
|
);
|
|
|
+// $('.{$this->class['start']}').on("dp.change", function (e) {
|
|
|
+// $('.{$this->class['end']}').data("DateTimePicker").minDate(e.date);
|
|
|
+// });
|
|
|
+// $('.{$this->class['end']}').on("dp.change", function (e) {
|
|
|
+// $('.{$this->class['start']}').data("DateTimePicker").maxDate(e.date);
|
|
|
+// });
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -165,11 +166,11 @@ JS;
|
|
|
return <<<EOT
|
|
|
<span class="dropdown" style="position:absolute">
|
|
|
<form action="{$this->formAction()}" pjax-container style="display: inline-block;">
|
|
|
- <a href="javascript:void(0);" class="dropdown-toggle {$active}" data-toggle="dropdown">
|
|
|
+ <a href="javascript:void(0);" class="{$active}" data-toggle="dropdown">
|
|
|
<i class="feather icon-filter"></i>
|
|
|
</a>
|
|
|
- <ul class="dropdown-menu" role="menu" style="padding: 10px;left: -70px;border-radius: 0;font-weight:normal;background:#fff">
|
|
|
- <li>
|
|
|
+ <ul class="dropdown-menu" role="menu" style="min-width: 180px;padding: 10px;left: -70px;border-radius: 0;font-weight:normal;background:#fff">
|
|
|
+ <li class="dropdown-item">
|
|
|
<input type="text"
|
|
|
class="form-control input-sm {$this->class['start']}"
|
|
|
name="{$this->getQueryName()}[start]"
|
|
|
@@ -178,16 +179,16 @@ JS;
|
|
|
autocomplete="off" />
|
|
|
</li>
|
|
|
<li style="margin: 5px;"></li>
|
|
|
- <li>
|
|
|
+ <li class="dropdown-item">
|
|
|
<input type="text"
|
|
|
- class="form-control input-sm {$this->class['start']}"
|
|
|
+ class="form-control input-sm {$this->class['end']}"
|
|
|
name="{$this->getQueryName()}[end]"
|
|
|
placeholder="{$this->trans('between_end')}"
|
|
|
value="{$value['end']}"
|
|
|
autocomplete="off"/>
|
|
|
</li>
|
|
|
- <li class="divider"></li>
|
|
|
- <li class="">
|
|
|
+ <li class="dropdown-divider"></li>
|
|
|
+ <li class="dropdown-item">
|
|
|
<button class="btn btn-sm btn-primary column-filter-submit "><i class="feather icon-search"></i></button>
|
|
|
</li>
|
|
|
</ul>
|
|
|
@@ -198,6 +199,7 @@ EOT;
|
|
|
|
|
|
protected function collectAssets()
|
|
|
{
|
|
|
+ Admin::collectAssets('moment');
|
|
|
Admin::collectAssets('bootstrap-datetimepicker');
|
|
|
}
|
|
|
}
|