#13344 fix date tokens

This commit is contained in:
Jonathan 2024-04-16 15:22:02 +02:00
parent ba1c013381
commit 5769a412a8
1 changed files with 6 additions and 1 deletions

View File

@ -216,7 +216,6 @@ ui_require_jquery_file('ui.datepicker-'.get_user_language(), 'include/javascript
var time = date+' '+$('#text-time-expiration').val();
if (date !== '' && $('#text-time-expiration').val() !== '') {
if (date < $('#hidden-today_date').val() || time < $('#hidden-today_date').val()+' '+$('#hidden-today_time').val()) {
console.log("ENTRO AQUI");
errordate();
} else{
$('#form_token').submit();
@ -229,6 +228,12 @@ ui_require_jquery_file('ui.datepicker-'.get_user_language(), 'include/javascript
}
} else if (date === '' && time !== ' ') {
errordate();
} else if (date !== '' && $('#text-time-expiration').val() === '') {
if (date < $('#hidden-today_date').val()) {
errordate();
} else{
$('#form_token').submit();
}
}else {
$('#form_token').submit();
}