As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.
Join the TIBCO Community TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.
From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
Request access to the private WebFOCUS User Group (login required) to network with fellow members.
Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.
Yeah, the date control doesn't seem to be quite complete and apparently contains a bug where it doesn't always apply the "right" date-formatting before posting it. Which brings me to the issue that there doesn't seem to be a way to specify what date-format it should be using at all, that's bound to cause problems sooner or later. I don't know who implemented that control, but it almost seems like they stopped working on it half-way through...
I usually include below javascript for HTML forms that make use of the calendar control. It overrides one of IBI's functions to change its behaviour. You may not need all of it, it's not entirely clean; I rolled my own event-attach function - there's probably one in the IBI code-base, but I didn't bother searching for it.
Still, it would be better if we'd get a complete implementation that handles
the onchange event when people type a date in the text field, and
for which you can specify what date-formats it should be using for displaying data and for posting data to the focus procedure handling the results (these are often different in my experience).
Right now we have to "parse" the posted date, as it can be in either of two formats!
// Event handler to add rawvalue after calendar field was changed by hand
function calendarChanged(obj, event) {
obj.setAttribute("rawvalue", obj.value);
}
/*
* Override WebFOCUS version with one adding an onchange event handler
*/
function setupDocCalendars()
{
var coll = document.getElementsByTagName("INPUT");
for( var i = 0; i < coll.length ; ++i )
{
oCtrl = coll[i];
if(oCtrl.getAttribute("elementtype") != 14) continue;
var ibiFormat = _getCalendarProperty(oCtrl, "ibiformat");
if( isATextControl(oCtrl) &&
0 == oCtrl.readOnly &&
'none' != oCtrl.style.display &&
'hidden' != oCtrl.style.visibility &&
ibiFormat != null &&
isYMDCombo(ibiFormat)
) {
setupCtrlCalendar( oCtrl, ibiFormat);
addEventHandler(oCtrl, "change", calendarChanged);
}
}
return;
}
function addEventHandler(obj, eventType, callback) {
if (obj.addEventListener) {
obj.addEventListener(
eventType,
function() { callback(obj, eventType); },
false
);
} else if (obj.attachEvent) {
obj.attachEvent(
'on' + eventType,
function() { callback(obj, eventType); }
);
}
}
WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010 : Member of User Group Benelux :
Hmmm, added the onmousemove event to the body tag, via point-and-click. The function called in this event function has an alert. As soon as I added the onmousemove event, I got an endless loop of alert - had to use Windows Task Manager to kill Dev Studio.
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server