Document revision: 2022-08-15
Refers to WEBDLG2 version: PE83-2207080 (beta version 57)
Table of contents
Overview
The plugin interface allows to extend WEBDLG2 with customized user interface
elements. A plugin consists of Javascript code (functionality) and CSS rules
(visual appearance).
Please note:
The current plugin interface API is considered preliminary.
When final, detailed documentation will be published here.
The Datepicker plugin
The Datepicker plugin example demonstrates the implementation of
a datepicker object class.
The datepicker displays a specified date or the current date in
the representation of the current
locale.
It provides an integrated calendar to conveniently modify the date.
Attributes
- date : string, get/set
- The date is set or returned in a format as specified by the
format attribute (see
below).
By default (if the date is not set), the datepicker displays the current date.
- format : string, get/set
- The format used to set or get the date. The format string is
parsed for special letters which are replaced by the date components
as documented below:
Format | Date Component | Example |
yyyy | Year | 2022 |
yy | Year | 22 |
MM | Month in year | 04 (April) |
M | Month in year | 4 (April) |
dd | Day in month | 01 |
d | Day in month | 1 |
The default format is dd.MM.yyyy.
Download and installation
- HP-UX, Linux
- Download:
webdlg2-datepicker.220308.tgz
Installation (as superuser):
cd /directory/in/web/server/document/hierarchy
tar xzf /path/to/webdlg2-datepicker.220308.tgz
- Windows
- Download:
webdlg2-datepicker.220308.zip
Please unpack the webdlg2-datepicker.220308.zip contents into the
web server document hierarchy.
The datepicker plugin example consists of the files
webdlg-datepicker.js (Javascript code) and
webdlg-datepicker.css (CSS rules).
To use the plugin in your WEBDLG2 applications, integrate these files
into the HTML documents, for example:
<script async
src="/path/to/webdlg-datepicker.js">
</script>
<link href="/path/to/webdlg-datepicker.css"
rel="stylesheet" type="text/css">
As shown here, using the <script async> attribute is recommended
to avoid that the script potentially delays loading the document
(1).
|