Skip to content

Commit

Permalink
Fix: correction in select date for birthday (#688)
Browse files Browse the repository at this point in the history
* Fix: correction in select date for birthday

* Feat: added new version for changelog and config

---------

Co-authored-by: Igor Gonçalves <igor_goncalves@live.com>
  • Loading branch information
nathanipti and igorgoncalves committed Apr 17, 2024
1 parent 2ce8b96 commit 5f42cf3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
## [Versão 3.77.135]
- Correção ao pegar data de aniversário do estudante
- Foi corrigido para incluir o intervalo de 1900 até o ano corrente

## [Versão 3.77.134]
Expand Down
3 changes: 2 additions & 1 deletion js/student/form/validations.js
Original file line number Diff line number Diff line change
Expand Up @@ -945,7 +945,8 @@ function checkCivilRegisterEnrollmentNumberValidity(element) {
}
if (valid) {
let year = value.substring(10, 14);
let birthday = $(formIdentification + "birthday").cleanVal();
var selectedDate = $("#initial_date_picker").val();
let birthday = selectedDate.replace(/\//g, '');
if (birthday !== "" && birthday.length === 8) {
let birthdayYear = birthday.substring(4, 8);
if (year < birthdayYear) {
Expand Down

0 comments on commit 5f42cf3

Please sign in to comment.