mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-14 09:02:12 +00:00
Merge pull request #8166 from bendavies/grid-date-to-from-not-required
[Grid] to and from are not required in grid date filter
This commit is contained in:
commit
d7d00c60e9
2 changed files with 2 additions and 14 deletions
|
|
@ -32,7 +32,7 @@ final class DateFilter implements FilterInterface
|
|||
|
||||
$field = $this->getOption($options, 'field', $name);
|
||||
|
||||
$from = $this->getDateTime($data['from']);
|
||||
$from = isset($data['from']) ? $this->getDateTime($data['from']) : null;
|
||||
if (null !== $from) {
|
||||
$inclusive = (bool)$this->getOption($options, 'inclusive_from', self::DEFAULT_INCLUSIVE_FROM);
|
||||
if (true === $inclusive) {
|
||||
|
|
@ -42,7 +42,7 @@ final class DateFilter implements FilterInterface
|
|||
}
|
||||
}
|
||||
|
||||
$to = $this->getDateTime($data['to']);
|
||||
$to = isset($data['to']) ? $this->getDateTime($data['to']) : null;
|
||||
if (null !== $to) {
|
||||
$inclusive = (bool)$this->getOption($options, 'inclusive_to', self::DEFAULT_INCLUSIVE_TO);
|
||||
if (true === $inclusive) {
|
||||
|
|
|
|||
|
|
@ -50,10 +50,6 @@ final class DateFilterSpec extends ObjectBehavior
|
|||
'from' => [
|
||||
'date' => '2016-12-05',
|
||||
'time' => '08:00',
|
||||
],
|
||||
'to' => [
|
||||
'date' => '',
|
||||
'time' => '',
|
||||
]
|
||||
],
|
||||
[]
|
||||
|
|
@ -131,10 +127,6 @@ final class DateFilterSpec extends ObjectBehavior
|
|||
$dataSource,
|
||||
'checkoutCompletedAt',
|
||||
[
|
||||
'from' => [
|
||||
'date' => '',
|
||||
'time' => '',
|
||||
],
|
||||
'to' => [
|
||||
'date' => '2016-12-06',
|
||||
'time' => '08:00',
|
||||
|
|
@ -187,10 +179,6 @@ final class DateFilterSpec extends ObjectBehavior
|
|||
$dataSource,
|
||||
'checkoutCompletedAt',
|
||||
[
|
||||
'from' => [
|
||||
'date' => '',
|
||||
'time' => '',
|
||||
],
|
||||
'to' => [
|
||||
'date' => '2016-12-06',
|
||||
'time' => '',
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue