Skip to content

Commit a88af7b

Browse files
authored
Update FilterDateTimePicker.php (#1762)
```Filter::datetimepicker()``` has no difference with ```Filter::datepicker()``` With this change there is a time option with Flatpickr Actually, you should also 'disable' the ```enableTime``` option in ```config/livewire-powergrid.php``` to let these two differ from each other. To also enable seconds with the datetimepicker you can use: ``` Filter::datetimepicker('created_at')->params(['enableSeconds' => true]) ```
1 parent 3ab657a commit a88af7b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Components/Filters/FilterDateTimePicker.php

+4-2
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@ class FilterDateTimePicker extends FilterBase
77
{
88
public string $key = 'datetime';
99

10-
public array $params = [];
10+
public array $params = [
11+
'enableTime' => true,
12+
];
1113

1214
public function params(array $params): FilterDateTimePicker
1315
{
14-
$this->params = $params;
16+
$this->params = array_merge($this->params, $params);
1517

1618
return $this;
1719
}

0 commit comments

Comments
 (0)