xpages

Usage of "Extension Library"

Introduction#

Here you find some tipps and use case examples for the “Extension Library” of OpenNTF (https://extlib.openntf.org/).

Remarks#

This works at least for IE 11. I didn’t test this for other browsers.

Use a “Font Awesome Icon” for the DatePicker (xe:djDateTextBox)

The default icon of the Date-Picker in the Extension Library from OpenNTF is nice but not sexy. You can change it to one of the cool “Font Awesome Icons”.

First, add a DatePicker component to your page:

<xe:djDateTextBox id="datePickerComp" value="#{myDoc.myDateField}" />

Then add these lines to your custom CSS file:

/*
   ---------------------------------------------------- 
   Improve xe:djDateTextBox Elements with another icon.
   ---------------------------------------------------- 
*/

.dijitSelect .dijitArrowButton{
    padding:0px;
}

/* hide default arrow icon: */
.dijitDateTextBox .dijitArrowButtonInner{
    display: none;
}

.dijitDateTextBox .dijitArrowButtonContainer:after{
    font: 12px/normal FontAwesome; 
    content: "\f073"; /* <--- unicode of the icon */
    font-size-adjust: none; 
    font-stretch: normal;
}
/* ---------------------------------------------------- */

The value of attribute content is the “Icon-Code” (in this example ”\f073” is the simple “fa-calendar” icon).

If you want another icon, visit https://fontawesome.io/icons/, search for your favorite icon, click to open ist detail, and there copy the Unicode. Paste the Unicode into yout custom CSS file as value of attribute content.


This modified text is an extract of the original Stack Overflow Documentation created by the contributors and released under CC BY-SA 3.0 This website is not affiliated with Stack Overflow