Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Disabling a calendar
Go
New
Search
Notify
Tools
Reply
  
Disabling a calendar
 Login/Join
 
Silver Member
posted
Hi,

In my Launchpage I have a text box for Year,Calendar control for From and Calendar control for To.
When the user enters a year in the textbox,the calendar controls should be disabled and when the user enters From or To date the textbox should be disabled.I am able to disable the text box.But I am not able to disable the Calendar controls.I am using the Disabled property of the calendar.only the textbox of the control is getting disabled but not the calendar icon.I am still able to click the calendar icon and select a date.This is not the behaviour I wanted.

The event I am using is onkeyup="toggleFromTo2('edit1', 'calendar1', 'calendar2')"

  

function toggleFromTo2(yearInput, fromInput, toInput) {
	
			
	 	if  ((document.getElementById(yearInput).value != "" || document.getElementById(yearInput).value.length > 0)) {
		document.getElementById(fromInput).disabled = true;
		document.getElementById(toInput).disabled = true;
		document.getElementById(fromInput).style.backgroundColor = "gray";
		document.getElementById(toInput).style.backgroundColor = "gray";
	}
	//otherwise enable the From and To fields
	else {
		document.getElementById(fromInput).disabled = false;
		document.getElementById(fromInput).style.backgroundColor = "";
		document.getElementById(toInput).disabled = false;
		document.getElementById(toInput).style.backgroundColor = "";
	}	
}




Could someone tell me where I am going wrong.The other issue I am having is when I enter the date in the calendar textbox manually only it disables the year textbox.when I use the calendar icon to select a date it doesnot disable the year textbox.

Am I using the wrong event.Could someone suggest a solution.
Thanks.


WebFOCUS 7.6.7
windows
Html,Pdf and Excel
 
Posts: 39 | Registered: September 03, 2010Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Funny you should ask; I hit that too this week, in 7.7.03.
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Reply With QuoteReport This Post
Expert
posted Hide Post
Wasn't there just a huge thread dedicated to disabling the calendar control ?


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6278 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Reply With QuoteReport This Post
Master
posted Hide Post
i created a white shim graphic, set the z-index to 1, and placed it over the calendar control icon. You can't natively touch it.

- ABT


------------------------------------
WF Environment:
------------------------------------
Server/Client, ReportCaster, Dev Studio: 7.6.11
Resource Analyzer, Resource Governor, Library, Maintain, InfoAssist
OS: Windows Server 2003
Application/Web Server: Tomcat 5.5.25
Java: JDK 1.6.0_03
Authentication: LDAP, MRREALM Driver
Output: PDF, EXL2K, HTM

------------------------------------
Databases:
------------------------------------
Oracle 10g
DB2 (AS/400)
MSSQL Server 2005
Access/FoxPro
 
Posts: 561 | Registered: February 03, 2010Reply With QuoteReport This Post
Expert
posted Hide Post
quote:
Wasn't there just a huge thread dedicated to disabling the calendar control ?
Here's a few of them




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
 
Posts: 3106 | Location: Tennessee, Nashville area | Registered: February 23, 2005Reply With QuoteReport This Post
Silver Member
posted Hide Post
Hi Doug,

The link you provided doesn't work.Could you check it once again.
Thankyou.


WebFOCUS 7.6.7
windows
Html,Pdf and Excel
 
Posts: 39 | Registered: September 03, 2010Reply With QuoteReport This Post
Expert
posted Hide Post
This is a discussion on how to disable the calendar control image:

DS HTML Composer: Calendar control icon


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Reply With QuoteReport This Post
Silver Member
posted Hide Post
The other problem I have is when I select a date using the calendar icon,the year textbox doesn't disable.When I enter the date manually in the calendar textbox,the year textbox is disabled.

Here is my code.

function toggleYear(fromInput, toInput, yearInput) {
	//if the From or To fields contain anything, disable the year input
	if ((document.getElementById(fromInput).value != "" || document.getElementById(fromInput).value.length > 0) ||
		(document.getElementById(toInput).value != "" || document.getElementById(toInput).value.length > 0)) {
			
			document.getElementById(yearInput).disabled = true;
			document.getElementById(yearInput).style.backgroundColor = "gray";
	}
	//otherwise enable them
	else {
		
		document.getElementById(yearInput).disabled = false;
		document.getElementById(yearInput).style.backgroundColor = "";
	}	
}  


In the HTML I have the event onkeyup="toggleYear('calendar22', 'calendar23', 'edit37')" for both the calendars.Should I use someother event? Could someone help.

Thanks


WebFOCUS 7.6.7
windows
Html,Pdf and Excel
 
Posts: 39 | Registered: September 03, 2010Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Disabling a calendar

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.