12/24/2022 0 Comments Font picker for chromeIf (ntains("ff") || ntains("edge") || topClass. * Browser detection - only Firefox, Edge and Chrome has native date pickers */ This change will only be done for browser that supports native date time pickers. The function will also remove the sibling element that contains the icon to avoid triggering the default overlay. The JS file will execute a function every type a page is rendered by listening to the 'afterDCUpdate' event from the dynamic container and converting the input type from a 'text' to a 'date' type. To expose the browser native picker, you can follow these steps:Ĭreate a new JS file called data-picker.js and attach it to your portal harness. By default, in the Pega platform we do not use the type 'date' for the date control because browsers like IE11 and Safari do not provide a native picker These icons are typically used pretty extensively throughout the website, such as for social sharing links, menus, and UI indicators. Some of the more popular libraries of the moment include Font Awesome, IcoMoon, and Foundation Icon Fonts. Some of the modern browsers can display their own date picker if the input field is of type 'date'. Most of the Sitecore projects I work on incorporate some sort of font icon library into the website design. Overriding the default behavior of the text input for a date property is much more flexible than creating a new custom control because it will be possible to reuse existing sections and cases from other applications and will minimize the amount of customization and maintenance required.įor this customization we will look at using the native browser data picker overlay and creating a custom picker.ġ/ Exposing the native browser date and time picker The purpose of this article is to demonstrate the different ways you can customize this overlay and provide a different picker while using the same auto-generated text input control. You can also restyle the overlay with some CSS if needed. The date picker overlay that is provided out of box provides a lot of configuration options including the ability to set the range of years to display, the number of weeks in the calendar. When you configure a date or datetime property, the default display mode is to render the date as an input field and to display an overlay when clicking on the calendar icon to pick a different date. Robotic Process Automation Design Patterns
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |