@@ -131,7 +131,7 @@ |
||
131 | 131 | |
132 | 132 | public static function register(?string $inputFormat = null, ?string $searchFormat = null) |
133 | 133 | { |
134 | - Container::extensionMethod('addTbDateRange', function ($container, $name, $label = null, $maxLength = null) use ($inputFormat, $searchFormat) { |
|
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 | 137 | if (null !== $inputFormat) |
@@ -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 | }); |
@@ -96,7 +96,7 @@ |
||
96 | 96 | |
97 | 97 | public static function register(?string $searchFormat = null, ?\DateTime $startTime = null, ?\DateTime $endTime = null) |
98 | 98 | { |
99 | - Container::extensionMethod('addAdminLteDateTimeRange', function ($container, $name, $label = null, $maxLength = null) use ($searchFormat, $startTime, $endTime) { |
|
99 | + Container::extensionMethod('addAdminLteDateTimeRange', function($container, $name, $label = null, $maxLength = null) use ($searchFormat, $startTime, $endTime) { |
|
100 | 100 | $picker = $container[$name] = new DateTimeRange($name, $label, $maxLength, $searchFormat, $startTime, $endTime); |
101 | 101 | return $picker; |
102 | 102 | }); |
@@ -195,7 +195,7 @@ |
||
195 | 195 | |
196 | 196 | public static function register(?string $searchFormat = null, ?\DateTime $startTime = null, ?\DateTime $endTime = null) |
197 | 197 | { |
198 | - Container::extensionMethod('addDateTimeRangeButton', function ($container, $name, $label = null, $maxLength = null, $searchFormat = null, \DateTime $startTime = null, \DateTime $endTime = null) { |
|
198 | + Container::extensionMethod('addDateTimeRangeButton', function($container, $name, $label = null, $maxLength = null, $searchFormat = null, \DateTime $startTime = null, \DateTime $endTime = null) { |
|
199 | 199 | $picker = $container[$name] = new DateTimeRangeButton($name, $label, $maxLength, $searchFormat, $startTime, $endTime); |
200 | 200 | return $picker; |
201 | 201 | }); |
@@ -64,7 +64,7 @@ |
||
64 | 64 | |
65 | 65 | public static function register(?string $inputFormat = null, ?string $searchFormat = null) |
66 | 66 | { |
67 | - Container::extensionMethod('addBootstrapDateRange', function ($container, $name, $label = null, $maxLength = null) use ($inputFormat, $searchFormat) { |
|
67 | + Container::extensionMethod('addBootstrapDateRange', function($container, $name, $label = null, $maxLength = null) use ($inputFormat, $searchFormat) { |
|
68 | 68 | $picker = $container[$name] = new BootstrapDateRange($name, $label, $maxLength); |
69 | 69 | |
70 | 70 | if (null !== $inputFormat) { |
@@ -61,7 +61,7 @@ |
||
61 | 61 | |
62 | 62 | public static function register(?string $inputFormat = null, ?string $searchFormat = null) |
63 | 63 | { |
64 | - Container::extensionMethod('addBootstrapRange', function ($container, $name, $label = null, $maxLength = null) use ($inputFormat, $searchFormat) { |
|
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 | 67 | if (null !== $inputFormat) |
@@ -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 | }); |