1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-01 20:30:39 +02:00

placeholder attribute wasn't working on datepicker input.

This commit is contained in:
Cameron
2019-08-13 12:16:34 -07:00
parent 1fb0c3138d
commit 7af965f97d

View File

@@ -1743,8 +1743,11 @@ class e_form
$firstDay = vartrue($options['firstDay']) ? $options['firstDay'] : 0; $firstDay = vartrue($options['firstDay']) ? $options['firstDay'] : 0;
$xsize = (vartrue($options['size']) && !is_numeric($options['size'])) ? $options['size'] : 'xlarge'; $xsize = (vartrue($options['size']) && !is_numeric($options['size'])) ? $options['size'] : 'xlarge';
$disabled = vartrue($options['disabled']) ? "disabled" : ""; $disabled = vartrue($options['disabled']) ? "disabled" : "";
$placeholder = vartrue($options['placeholder']) ? 'placeholder="'.$options['placeholder'].'"' : '';
$timezone = ''; $timezone = '';
if(!empty($options['timezone'])) // since datetimepicker does not support timezones and assumes the browser timezone is the intended timezone. if(!empty($options['timezone'])) // since datetimepicker does not support timezones and assumes the browser timezone is the intended timezone.
{ {
date_default_timezone_set($options['timezone']); date_default_timezone_set($options['timezone']);
@@ -1762,7 +1765,7 @@ class e_form
} }
else else
{ {
$text .= "<input class='{$class} input-".$xsize." form-control' type='text' size='{$size}' id='e-datepicker-{$id}' value='{$value}' data-date-unix ='{$useUnix}' data-date-format='{$dformat}' data-date-ampm='{$ampm}' data-date-language='".e_LAN."' data-date-firstday='{$firstDay}' {$required} {$disabled} {$timezone} />"; $text .= "<input class='{$class} input-".$xsize." form-control' type='text' size='{$size}' id='e-datepicker-{$id}' value='{$value}' data-date-unix ='{$useUnix}' data-date-format='{$dformat}' data-date-ampm='{$ampm}' data-date-language='".e_LAN."' data-date-firstday='{$firstDay}' {$required} {$disabled} {$placeholder} {$timezone} />";
$ftype = (!empty($options['debug'])) ? 'text' : 'hidden'; $ftype = (!empty($options['debug'])) ? 'text' : 'hidden';
$text .= "<input type='{$ftype}' name='{$name}' id='{$id}' value='{$hiddenValue}' />"; $text .= "<input type='{$ftype}' name='{$name}' id='{$id}' value='{$hiddenValue}' />";
} }