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     [CLOSED] Calendar with dates bolded

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Calendar with dates bolded
 Login/Join
 
Member
posted
I am wondering if there is a way to have a calendar input that "bolds" or highlights specific days indicating there are data records for those days?

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


WebFOCUS 8.2
 
Posts: 7 | Registered: December 04, 2017Report This Post
Virtuoso
posted Hide Post
If your goal is to only have users to select only date where data exist I do suggest you to create a dropdown list with these dates in.
You can easily build a fex to extract dates where data exist and then use that date' list to feed a dropdown list.


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
How about something like this?
  
-DEFAULTH &START_DATE='';
-DEFAULTH &DATE_ARRAY='';

TABLE FILE wf_retail
BY WF_RETAIL.WF_RETAIL_EMPLOYEE_MANAGER.START_DATE/MDYY
ON TABLE HOLD
END
-RUN
-READFILE HOLD

-SET &BEGIN_DATE = EDIT(&START_DATE, '99-99-9999');
-SET &CNTR_END = TRIM_(BOTH, ' ', &LINES.EVAL);

-SET &DATE_ARRAY = ''''|| &BEGIN_DATE||''',';

-REPEAT :GETARRAY FOR &CNTR FROM 2 TO &CNTR_END
-READFILE HOLD
-SET &DATE_ARRAY = &DATE_ARRAY || '''' || EDIT(&START_DATE, '99-99-9999')|| ''',';
-:GETARRAY

-HTMLFORM BEGIN NOEVAL
<head>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.css" />
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
    <script defer src="https://use.fontawesome.com/releases/v5.0.13/js/all.js"></script>
</head>

<body>
    <div class="div-dateInput" style="padding:10px;">
        <label for="dateInput"><strong>Select Date:</strong><br>
            <input type="text" id="dateInput" name="dateInput" style="width:90px; text-align:center;" />
        </label>
    </div>
    <script>
        $(document).ready(function () {
            initComponent();
        });

        availableDates = [ !IBI.AMP.DATE_ARRAY; ];

        function initComponent() {
            $("#dateInput").datepicker({
                showOn: 'button',
                buttonText: '<i id="myCalendar" class="far fa-calendar-alt"></i>',
                dateFormat: 'mm/dd/yy',
                minDate: new Date('!IBI.AMP.BEGIN_DATE;'),
                defaultDate: new Date('!IBI.AMP.BEGIN_DATE;'),
                beforeShowDay: function (d) {
                    var mdy = (d.getMonth() + 1);
                    if (d.getMonth() < 9)
                        mdy = "0" + mdy;
                    mdy += "-";

                    if (d.getDate() < 10) mdy += "0";
                    mdy += d.getDate() + "-" + d.getFullYear();

                    console.log(mdy + ' : ' + ($.inArray(mdy, availableDates)));

                    if ($.inArray(mdy, availableDates) != -1) {
                        return [true, "", "Available"];
                    } else {
                        return [false, "", "unAvailable"];
                    }
                }
            });
        }
    </script>
</body>

This message has been edited. Last edited by: Hallway,


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     [CLOSED] Calendar with dates bolded

Copyright © 1996-2020 Information Builders