Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Feat: added class DatePickerWidget * Fix: added new renderDatePicker * Fix: added new renderDatePicker for school * Fix: added new renderDatePicker for student * Feat: added new version for changelog and config --------- Co-authored-by: Igor Gonçalves <igor_goncalves@live.com>
- Loading branch information
1 parent
40e08ad
commit 38b5ca7
Showing
6 changed files
with
54 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?php | ||
|
||
class DatePickerWidget | ||
{ | ||
public static function renderDatePicker($model, $attribute) | ||
{ | ||
return [ | ||
'model' => $model, | ||
'attribute' => $attribute, | ||
'options' => [ | ||
'dateFormat' => 'dd/mm/yy', | ||
'changeYear' => true, | ||
'changeMonth' => true, | ||
'yearRange' => '1930:' . date('Y'), | ||
'showOn' => 'focus', | ||
'maxDate' => 0, | ||
'monthNamesShort' => [ | ||
'Janeiro', 'Fevereiro', 'Março', 'Abril', 'Maio', 'Junho', | ||
'Julho', 'Agosto', 'Setembro', 'Outubro', 'Novembro', 'Dezembro' | ||
], | ||
'dayNames' => [ | ||
'Domingo', | ||
'Segunda-feira', | ||
'Terça-feira', | ||
'Quarta-feira', | ||
'Quinta-feira', | ||
'Sexta-feira', | ||
'Sábado' | ||
], | ||
'dayNamesShort' => ['Dom', 'Seg', 'Ter', 'Qua', 'Qui', 'Sex', 'Sáb'], | ||
'dayNamesMin' => ['Dom', 'Seg', 'Ter', 'Qua', 'Qui', 'Sex', 'Sáb'], | ||
], | ||
'htmlOptions' => [ | ||
'id' => 'initial_date_picker', | ||
'readonly' => 'readonly', | ||
'style' => 'cursor: pointer;', | ||
'placeholder' => 'Clique aqui para escolher a data' | ||
], | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters