N°6455 Fix datepicker widget icon on button

The buttonText is now escaped
This commit is contained in:
Pierre Goiffon
2024-03-18 18:15:39 +01:00
parent 8ffcb01c43
commit fa5d03fc6e

View File

@@ -301,7 +301,7 @@ class iTopWebPage extends NiceWebPage implements iTabbedPage
// Date picker options
$aPickerOptions = array(
'showOn' => 'button',
'buttonText' => '<i class="fas fa-calendar-alt"></i>',
'buttonText' => '', // N°6455 class will be added after JQuery UI widget
'dateFormat' => AttributeDate::GetFormat()->ToDatePicker(),
'constrainInput' => false,
'changeMonth' => true,
@@ -354,6 +354,7 @@ class iTopWebPage extends NiceWebPage implements iTabbedPage
// Note: Trigger image is wrapped in a span so we can display it we want
$(".date-pick").datepicker($sJSDatePickerOptions)
.next("img").wrap("<span>");
$("button.ui-datepicker-trigger").addClass('fas fa-calendar-alt');
// Hack for the date and time picker addon issue on Chrome (see #1305)
// The workaround is to instantiate the widget on demand