Focal Point
[SHARING] Calendar Control onChange event handling when using the date picker

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/4907099926

April 05, 2013, 02:21 PM
Francis Mariani
[SHARING] Calendar Control onChange event handling when using the date picker
Using the date picker to select a date in the Calendar Control does not trigger the onChange event. This has apparently been corrected in v8.

Thanks to a suggestion by Harry at Tech Support, it looks like the following works in versions prior to v8:

Put the Calendar Control in a container and add an onmouseover event handler to the container. The container can be invisible and (I suppose) slightly larger than the calendar control.

I added the onmouseover event handler to the gold (Salmon?) panel. Now, when I select a date from the date picker or by typing it in, the onmouseover event handler kicks in and computes the text to display below the controls.




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
April 05, 2013, 04:57 PM
Francis Mariani
Some months have more week rows than others - Sep. 2013 has 6, therefore the date picker frame must be within the container...


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
April 06, 2013, 11:13 AM
George Patton
Nice. Smiler


WebFOCUS 7.7.05 Windows, Linux, DB2, IBM Lotus Notes, Firebird, Lotus Symphony/OpenOffice. Outputs PDF, Excel 2007 (for OpenOffice integration), WP
April 25, 2014, 09:21 AM
stur0063
I'm on 8005 - I just wired up my first calendar widget to an HTML page.

When you type in the box - the onchange fires.
When you click the calendar icon and select your date - it does not fire the onchange.

It does not appear to me this is fixed in 8.

I may have to resort to some IT trickery.


webFOCUS 8207.15
WindowsServer 2019
April 25, 2014, 03:13 PM
J
stur0063 is right, at least for 8005:
 //Begin function calendar1_onchange
function calendar1_onchange(ctrl) {
	alert();
}
//End function calendar1_onchange 

Works for manual input but using the date picker does not fire.


WebFOCUS 7.7.03/8.0.08
Dev Studio 7.7.03/8.0.08
App Studio 8.0.08
Windows 7
ALL Outputs
April 28, 2014, 09:54 AM
Francis Mariani
This is not the first example of being told that something that didn't work in WF 7.* will work in 8.* but doesn't really.


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
April 28, 2014, 03:35 PM
BarryS
Hi Francis

I would assume you are validiating the calendar date. If so you can validate the calendar date when clicking on a run button and if its not correct pass focus back to the calendar control.

The Onchange event does not get execute when user click on a date. I did not know that the issue has been addressed. We are using the dynacalendar control and if you want more control over the calendar you may be able to use the JSquery calendar control.

Thanks Barry


WebFOCUS 8103, Windows, App Studio
April 28, 2014, 03:57 PM
Francis Mariani
Barry, thanks very much for your feedback. We have started using the jQuery calendar control more and more since it is more configurable than the HTML Composer calendar control.

Cheers,


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