Focal Point Banner


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.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Year in calendar picker

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Year in calendar picker
 Login/Join
 
Gold member
posted
Currently the year in the calendar tool will only allow you to go back -50 years. Which means it is useless if you want to use it as a birthdate. What is the easiest solution to get around this since programming sees no need in changing this default?

This message has been edited. Last edited by: FP Mod Chuck,


WebFOCUS 8

Windows, All Outputs
 
Posts: 55 | Location: Phoenix | Registered: March 01, 2018Report This Post
Virtuoso
posted Hide Post
Could you provide us with the specific version of WebFOCUS 8 you're using?
Also, is this with the autoprompt or are you putting this in an HTML composer page in App Studio?

Sample fex would be very helpful too.


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Virtuoso
posted Hide Post
From HTML composer, the calendar control settings can only go from +/-50 years.
Do not allow to go below or over that.

Maybe a NFR


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Master
posted Hide Post
Les
If this was Maintain, you could preset the variable populating the calendar with a date like 1930/01/01. When I click on the year drop down I see 1920 - 2030.

It looks like if you set a Static Value like that it works as well.

Mark
 
Posts: 663 | Location: New York | Registered: May 08, 2003Report This Post
Gold member
posted Hide Post
I was able to get a work around from Tech Support using js. This allows the calendar year datepicker to go back 100 years.

var today = new Date();
var yy = today.getFullYear()-100;
var fromDate = new Date();
fromDate.setFullYear(yy, 0, 1);
var toDate = new Date();
toDate.setFullYear(toDate.getFullYear() + 100);
IbComposer_setCalendarDatesRange('calendar1', fromDate, toDate);


WebFOCUS 8

Windows, All Outputs
 
Posts: 55 | Location: Phoenix | Registered: March 01, 2018Report This Post
Master
posted Hide Post
Use a static date range and you can go back to 1850


Hallway

 
Prod: 8202M1
Test: 8202M4
Repository:
 
OS:
 
Outputs:
 
 
 
 
 
Posts: 608 | Location: Salt Lake City, UT, USA | Registered: November 18, 2015Report This Post
Master
posted Hide Post
IBI uses jQueryUI for their forms, so the library is already loaded (along with jQuery) and in the 'Embedded Javascript' tab you can easily change any of the options listed here: https://api.jqueryui.com/datepicker/

Just do the following to put your custom calendar control:

  • Draw a Calendar control and note or change the unique ID. Example: 'calendar1.'
  • Go to the 'Embedded Javascript' tab at the bottom
  • In the function window_onload(), just add the few lines of code after the UpdateData() function call.

Here is an example that uses the jQuery animations to scale in from the button
  
function window_onload() {
    UpdateData();
    const calendar1 = document.getElementById('calendar1');
    $(calendar1).removeClass().datepicker({
        showAnim: "scale",
        showOptions: { origin: ["top", "right"] },
        showOtherMonths: true,
        selectOtherMonths: true,
        hideIfNoPrevNext: true,
        yearRange: '-100:+0',
        minDate: '-100y',
        maxDate: 0,
        changeMonth: true,
        changeYear: true,
        showOn: "button",
        buttonImage: "/ibi_apps/ibi_html/javaassist/ibi/html/maint/dynCalendar.png",
        buttonImageOnly: true,
        buttonText: "Select date",
    });
}


Hallway

 
Prod: 8202M1
Test: 8202M4
Repository:
 
OS:
 
Outputs:
 
 
 
 
 
Posts: 608 | Location: Salt Lake City, UT, USA | Registered: November 18, 2015Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Year in calendar picker

Copyright © 1996-2020 Information Builders