Merge branch 'ent-12400-errores-de-formato-en-la-seleccion-de-fechas-de-log-viewer' into 'develop'

Ent 12400 errores de formato en la seleccion de fechas de log viewer

See merge request artica/pandorafms!6653
This commit is contained in:
Rafael Ameijeiras 2023-11-27 11:41:02 +00:00
commit 538a3448e8
1 changed files with 14 additions and 12 deletions

View File

@ -7305,8 +7305,10 @@ function html_print_select_date_range(
$time_end='', $time_end='',
$date_text=SECONDS_1DAY, $date_text=SECONDS_1DAY,
$class='w100p', $class='w100p',
$date_format='Y/m/d', $date_format_php='Y/m/d',
$time_format='H:i:s' $time_format_php='H:i:s',
$date_format_js='yy/mm/dd',
$time_format_js='HH:mm:ss'
) { ) {
global $config; global $config;
@ -7328,21 +7330,21 @@ function html_print_select_date_range(
} }
if ($date_end === '') { if ($date_end === '') {
$date_end = date($date_format); $date_end = date($date_format_php);
} }
if ($date_init === '') { if ($date_init === '') {
$date_init = date($date_format, strtotime($date_end.' -1 days')); $date_init = date($date_format_php, strtotime($date_end.' -1 days'));
} }
$date_init = date($date_format, strtotime($date_init)); $date_init = date($date_format_php, strtotime($date_init));
if ($time_init === '') { if ($time_init === '') {
$time_init = date($time_format); $time_init = date($time_format_php);
} }
if ($time_end === '') { if ($time_end === '') {
$time_end = date($time_format); $time_end = date($time_format_php);
} }
$fields[SECONDS_1DAY] = __('Last 24hr'); $fields[SECONDS_1DAY] = __('Last 24hr');
@ -7508,7 +7510,7 @@ function html_print_select_date_range(
} }
$('#text-date').datepicker({ $('#text-date').datepicker({
dateFormat: '".DATE_FORMAT_JS."', dateFormat: '".$date_format_js."',
changeMonth: true, changeMonth: true,
changeYear: true, changeYear: true,
showAnim: 'slideDown' showAnim: 'slideDown'
@ -7516,7 +7518,7 @@ function html_print_select_date_range(
$('[id^=text-time_init]').timepicker({ $('[id^=text-time_init]').timepicker({
showSecond: true, showSecond: true,
timeFormat: '".TIME_FORMAT_JS."', timeFormat: '".$time_format_js."',
timeOnlyTitle: '".__('Choose time')."', timeOnlyTitle: '".__('Choose time')."',
timeText: '".__('Time')."', timeText: '".__('Time')."',
hourText: '".__('Hour')."', hourText: '".__('Hour')."',
@ -7527,7 +7529,7 @@ function html_print_select_date_range(
}); });
$('[id^=text-date_init]').datepicker ({ $('[id^=text-date_init]').datepicker ({
dateFormat: '".DATE_FORMAT_JS."', dateFormat: '".$date_format_js."',
changeMonth: true, changeMonth: true,
changeYear: true, changeYear: true,
showAnim: 'slideDown', showAnim: 'slideDown',
@ -7549,7 +7551,7 @@ function html_print_select_date_range(
}); });
$('[id^=text-date_end]').datepicker ({ $('[id^=text-date_end]').datepicker ({
dateFormat: '".DATE_FORMAT_JS."', dateFormat: '".$date_format_js."',
changeMonth: true, changeMonth: true,
changeYear: true, changeYear: true,
showAnim: 'slideDown', showAnim: 'slideDown',
@ -7572,7 +7574,7 @@ function html_print_select_date_range(
$('[id^=text-time_end]').timepicker({ $('[id^=text-time_end]').timepicker({
showSecond: true, showSecond: true,
timeFormat: '".TIME_FORMAT_JS."', timeFormat: '".$time_format_js."',
timeOnlyTitle: '".__('Choose time')."', timeOnlyTitle: '".__('Choose time')."',
timeText: '".__('Time')."', timeText: '".__('Time')."',
hourText: '".__('Hour')."', hourText: '".__('Hour')."',