Display: Fix HTML code for datepicker element

pull/5752/merge
Angel Fernando Quiroz Campos 4 weeks ago
parent ef0a952aa5
commit 062e55c33b
No known key found for this signature in database
GPG Key ID: B284841AE3E562CD
  1. 7
      public/main/inc/lib/formvalidator/Element/DatePicker.php

@ -20,7 +20,7 @@ class DatePicker extends HTML_QuickForm_text
if (!isset($attributes['id'])) {
$attributes['id'] = $elementName;
}
$attributes['class'] = 'form-control';
$attributes['class'] = 'form-control border flex-grow';
parent::__construct($elementName, $elementLabel, $attributes);
$this->_appendName = true;
@ -57,11 +57,14 @@ class DatePicker extends HTML_QuickForm_text
$requiredSymbol = '<span class="form_required">*</span>';
}
$attrs = $this->_attributes;
unset($attrs['id']);
return '
<div>'.$requiredSymbol.$label.'</div>
<div id="'.$id.'" class="flex items-center mt-1 flatpickr-wrapper" data-wrap="true">
<input '.$this->_getAttrString($this->_attributes).'
class="form-control border flex-grow" type="text" value="'.$value.'" placeholder="'.get_lang('Select date').'" data-input>
value="'.$value.'" placeholder="'.get_lang('Select date').'" data-input>
<div class="flex space-x-1 ml-2" id="button-addon3">
<button class="btn btn--secondary-outline mr-2" type="button" data-toggle>
<i class="pi pi-calendar pi-lg"></i>

Loading…
Cancel
Save