@@ -115,10 +115,12 @@ |
||
| 115 | 115 | Container::extensionMethod('addRange', function ($container, $name, $label = null, $maxLength = null) use ($inputFormat, $searchFormat) { |
| 116 | 116 | $picker = $container[$name] = new Range($name, $label, $maxLength); |
| 117 | 117 | |
| 118 | - if (null !== $inputFormat) |
|
| 119 | - $picker->setInputFormat($inputFormat); |
|
| 120 | - if (null !== $searchFormat) |
|
| 121 | - $picker->setSearchFormat($searchFormat); |
|
| 118 | + if (null !== $inputFormat) { |
|
| 119 | + $picker->setInputFormat($inputFormat); |
|
| 120 | + } |
|
| 121 | + if (null !== $searchFormat) { |
|
| 122 | + $picker->setSearchFormat($searchFormat); |
|
| 123 | + } |
|
| 122 | 124 | |
| 123 | 125 | return $picker; |
| 124 | 126 | }); |
@@ -134,10 +134,12 @@ |
||
| 134 | 134 | Container::extensionMethod('addTbDateRange', function ($container, $name, $label = null, $maxLength = null) use ($inputFormat, $searchFormat) { |
| 135 | 135 | $picker = $container[$name] = new DateRange($name, $label, $maxLength); |
| 136 | 136 | |
| 137 | - if (null !== $inputFormat) |
|
| 138 | - $picker->setInputFormat($inputFormat); |
|
| 139 | - if (null !== $searchFormat) |
|
| 140 | - $picker->setSearchFormat($searchFormat); |
|
| 137 | + if (null !== $inputFormat) { |
|
| 138 | + $picker->setInputFormat($inputFormat); |
|
| 139 | + } |
|
| 140 | + if (null !== $searchFormat) { |
|
| 141 | + $picker->setSearchFormat($searchFormat); |
|
| 142 | + } |
|
| 141 | 143 | |
| 142 | 144 | return $picker; |
| 143 | 145 | }); |
@@ -64,10 +64,12 @@ |
||
| 64 | 64 | Container::extensionMethod('addBootstrapRange', function ($container, $name, $label = null, $maxLength = null) use ($inputFormat, $searchFormat) { |
| 65 | 65 | $picker = $container[$name] = new BootstrapRange($name, $label, $maxLength); |
| 66 | 66 | |
| 67 | - if (null !== $inputFormat) |
|
| 68 | - $picker->setInputFormat($inputFormat); |
|
| 69 | - if (null !== $searchFormat) |
|
| 70 | - $picker->setSearchFormat($searchFormat); |
|
| 67 | + if (null !== $inputFormat) { |
|
| 68 | + $picker->setInputFormat($inputFormat); |
|
| 69 | + } |
|
| 70 | + if (null !== $searchFormat) { |
|
| 71 | + $picker->setSearchFormat($searchFormat); |
|
| 72 | + } |
|
| 71 | 73 | |
| 72 | 74 | return $picker; |
| 73 | 75 | }); |