@@ -29,7 +29,7 @@ class DateInput extends Nette\Forms\Controls\BaseControl
2929 public function __construct ($ label = null )
3030 {
3131 parent ::__construct ($ label );
32- $ this ->addRule ([__CLASS__ , 'validateDate ' ], 'Date is invalid. ' );
32+ $ this ->addRule ([self ::class , 'validateDate ' ], 'Date is invalid. ' );
3333 }
3434
3535
@@ -76,20 +76,20 @@ public function getControl()
7676 {
7777 $ name = $ this ->getHtmlName ();
7878 return Html::el ('input ' , [
79- 'name ' => $ name . '[day] ' ,
80- 'id ' => $ this ->getHtmlId (),
81- 'value ' => $ this ->day ,
82- 'type ' => 'number ' ,
83- 'min ' => 1 ,
84- 'max ' => 31 ,
85- 'data-nette-rules ' => Helpers::exportRules ($ this ->getRules ()) ?: null ,
86- ])
79+ 'name ' => $ name . '[day] ' ,
80+ 'id ' => $ this ->getHtmlId (),
81+ 'value ' => $ this ->day ,
82+ 'type ' => 'number ' ,
83+ 'min ' => 1 ,
84+ 'max ' => 31 ,
85+ 'data-nette-rules ' => Helpers::exportRules ($ this ->getRules ()) ?: null ,
86+ ])
8787
8888 . Helpers::createSelectBox (
89- [1 => 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 ],
90- [],
91- $ this ->month
92- )->name ($ name . '[month] ' )
89+ [1 => 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 ],
90+ [],
91+ $ this ->month
92+ )->name ($ name . '[month] ' )
9393
9494 . Html::el ('input ' , [
9595 'name ' => $ name . '[year] ' ,
0 commit comments