|
|
|
|
|
|
|
|
|
|
|
|
|
|
DOMINO WEB COMPONENTS
Build a Domino pop-up calendar widget using formula language
By Daniel Koffler
Although available when programming for the Lotus Notes client, Domino does not provide any built-in widget or applet that lets Web client users easily select a date from a calendar to fill in date-based fields. As it stands, most Domino forums and programming guides advocate installing a 3rd party JavaScript or Java applet-based calendar.
This is wholly unnecessary as the Lotus Formula Language has amazing date handling functions that will let you easily build a customizable and reusable popup calendar in any web accessible Domino database.
The theory of calendars That calendars and date calculation seem like an arcane science to most is no surprise if you have ever examined the Java or JavaScript behind your favorite popup calendar.
In reality, building calendars is relatively simple when you understand how they are organized. Every calendar is simply a table consisting of seven columns (the days of the week) and between four to six rows depending on what day of the week the first of the month falls on and how many days are in the month. You can see a sample calendar in Figure A.
FIGURE A
 
Every calendar is a grid of seven columns and four to six rows. Roll over picture for a larger image.
You can think of the rows as "how many Sundays are in this month?" Look at any monthly calendar and you'll see what I mean, the only tricky part is figuring out what day of the week corresponds to the first of the month. The Lotus Formula Language makes this easy, we'll build most of the calendar in under 10 lines of code.
Basic setup First, we'll create a new form in Domino Designer called "MyForm" to hold the date field we want to update with the popup calendar. Create a date field on this form named "MyDate". Next to this field on the form type the following code and make it "Pass through HTML":
<a href="javascript:popCal('MyDate')">Calendar</a>
|
This will create a link in Web browsers viewing this form that will call the JavaScript function popCal and pass it the name of the field to updated, in this case "MyDate". When users click the word "Calendar" when viewing the page, a pop-up calendar will appear and by selecting a date in the calendar, the "MyDate" field will be updated, as shown in Figure B.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- Advertisement --
Power Tools 6.0 is a set of 90 administrative utilities for Lotus Notes & Domino
Power Tools simplifies management of the Notes/Domino environment by automating routine tasks. Power Tools can manage or monitor mail files, groups, ACLs, agents, LOG.NSF, templates and more.
Download a trial version from helpsoft.com. |
-- Advertisement --
Struggling with exporting Notes data to spreadsheets? No More!
Try IntelliPRINT, The world's leading Reporting, Dashboards, and Analysis solution for Notes & Domino
- Don't spend unproductive time maintaining different versions of the same spreadsheet
- Preserve data integrity and security in multi-user environments
- Create reports in minutes INSIDE Notes
- Get freedom from iterative report requests, deliver self-serve capabilities
Experience Reporting, Dashboards, and Analysis INSIDE Notes.
Try IntelliPRINT NOW! |
|
|
|
|
|
|
|
|
|
|