Focal Point
[CLOSED] ? about WebFocus Calendar Controls

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

January 18, 2013, 10:29 AM
jgelona
[CLOSED] ? about WebFocus Calendar Controls
All of what follows is done with the HTML Composer and it all works fine, I just have a question about what seems to me to be odd behavior.

I have a very simple form with 2 calendar controls; Begin Date and End Date. In the form, the range for begin date is from the current date -25 months to the current date. The range for the End Date is from the current date -13 months to the current date.

Here's the odd behavior. When the calendar icon is clicked for either date, the calendar opens with the month of the minimum allowed date. How do I get it to open with the current month? For example, right now when the calendar control is click for begin date it opens with December 2010. I would like for it to open with January 2013. We are on 7.6.11. Is this something that is fixed in a later release?

This message has been edited. Last edited by: Kerry,
January 18, 2013, 10:36 AM
Doug
The way that I do it is to open the htm form from within a fex using the -HTMLFORM [form_name]. But, before that line, I -SET or -DEFAULT the dates that I want to be "active" on the calendar controls.




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
January 18, 2013, 11:04 AM
John_Edwards
Mine defaults to today's month and I didn't explicitly change anything to make that happen. The field in my source code looks like this:

<INPUT style="Z-INDEX: 1; POSITION: absolute; WIDTH: 80px; HEIGHT: 22px; TOP: 61px; LEFT: 204px" id=startDate tabIndex=1 elementtype="14" persistentuniqueid="compUid_4" ibiformat="MDYY" defaultselection="1" name="calendar1" onKeyPress="document.getElementById('startDate').value=formatDate(document.getElementById('startDate').value);">


The onKeyPress is my own so don't worry about that. My guess is that the defaultselection attribute may have something to do with it, and there may be something that happens on page load that sets something. window_onload(); usually runs.

My page is home-grown so it may not be the best example, but every page I've ever seen made in the tool defaults to current month.

J.



January 18, 2013, 12:29 PM
Doug
Just as a matter of test, try it without your "onKeyPress" event and let us know the results...
January 23, 2013, 09:28 AM
jgelona
Thanks for the suggestions but using -SET prior to the -HTMLFORM did not work and neither did using defaultselection. It is not a big deal just an inconvenience. I will open a problem report with IBI.


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
January 30, 2013, 12:54 PM
jgelona
Here's is the solution.

Just before the form is opened, in the lauch program I have this:
-SET &BEGDT=&DATEMDYY;
-SET &ENDDT=&DATEMDYY;


Then in the HTML Composer, in the calendar control properties is put !IBI.AMP.BEGDT and !IBI.AMP.ENDDT in the appropriate 'Selected Value' in the Properties and Setting.

I knew there had to be an easy solution to this.

It is also here:

Dev Studio HTML Composer - Calendar - Default Date


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
January 30, 2013, 01:56 PM
Francis Mariani
According to the "Designing a User Interface for a Web Application With the HTML Composer" manual, -HTMLFORM abcdef.htm is not supported. Which means neither is !IBI.AMP and !IBI.FIL, but that shouldn't stop us from doing it.


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
January 31, 2013, 07:20 AM
David Glick
You should NOT do it because things like "Save Selection" will not work for example.


David Glick
Director WebFOCUS App Studio
and WebFOCUS Developer Studio
WebFOCUS Division
Information Builders, Inc.
Direct (917) 339-5560
Voice Mail (212) 736-6250 x3560
Fax (212) 947-5168
Email david_glick@ibi.com
January 31, 2013, 09:03 AM
jgelona
Anyone care to elaborate because it works perfectly and is the solution I got from IBI. They pointed me to the link I posted.


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
January 31, 2013, 10:02 AM
Francis Mariani
So, I suppose we need a New Feature Request to have a Calendar Control set to a specific date?


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
February 01, 2013, 07:25 AM
David Glick
Francis,

That is the process to follow. Any new feature should be opened as a Hottrack case please.


David Glick
Director WebFOCUS App Studio
and WebFOCUS Developer Studio
WebFOCUS Division
Information Builders, Inc.
Direct (917) 339-5560
Voice Mail (212) 736-6250 x3560
Fax (212) 947-5168
Email david_glick@ibi.com