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] WebFOCUS Calendars - Validate Number of Days Selected

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[Solved] WebFOCUS Calendars - Validate Number of Days Selected
 Login/Join
 
Member
posted
I have 2 IBI Calendars in an HTML.
I already have a routine to validate that the END date is Greater than the Start Date.

However, I need to validate that the User can only select 30 days. I already have the calendars limited to only the last 90 days, but within those 90 days, the user should only be able to select up to a 30 day period.

My plan is to use an event check when the user SUBMITs the reprot.

This message has been edited. Last edited by: Kathleen Butler,


Developer Studio 7.6.11
Reporting Server = Unix 7.6.8
Client = Unix
 
Posts: 29 | Location: Houston | Registered: June 19, 2012Report This Post
Virtuoso
posted Hide Post
You can convert the dates to Date-objects.

That's easy if they're RFC2822 or ISO8601 format date strings, you can just let Javascript parse the string (https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Date/parse).
If not, you can do it with some regexp magic.

With 2 Date objects you can calculate the number of milliseconds between the two dates at the UTC time-zone, which can be converted to number of days.

After that it's just a matter of returning true (accepted) or false (not accepted) in the onsubmit handler.


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 :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report 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] WebFOCUS Calendars - Validate Number of Days Selected

Copyright © 1996-2020 Information Builders