Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calendar control
Message
From
09/07/2003 17:14:55
Sasha Burkich
Senior Systems Analyst
British Columbia, Canada
 
 
To
06/07/2003 06:56:37
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00807235
Message ID:
00808692
Views:
13
Hi Winan,

you can use CustomValidator which will make use of the client side function. For example, something like this:

This JScript function accepts only numbers and accepts 1 dec. point.
function keyCheck(eventObj, obj)
{
	var keyCode

	// Check For Browser Type
	if (document.all){ 
		keyCode=eventObj.keyCode
	}
	else{
		keyCode=eventObj.which
	}

	var str=obj.value

	if(keyCode==46){ 
		if (str.indexOf(".")>0){
			return false
		}
	}

	if((keyCode<48 || keyCode >58)   &&   (keyCode != 46)){ // Allow only integers and decimal points
		return false
	}

	return true
}
HTH,

Sasha

>Dear All,
>
>the calendar control not refresh to new value (this problem is only occurs when I gave the new value with the following conditions:
>month is not current month
>year is not current year
>
>rsHoliday.Open(mSQL, cnData, ADODB.CursorTypeEnum.adOpenKeyset, ADODB.LockTypeEnum.adLockReadOnly)
>rsHoliday.MoveLast()
>
>Calendar1.SelectedDate = rsHoliday("Holiday").Value
>
>am I missing something??
>
>TIA
>
>Winan
Sasha Burkich
Consultant
Victoria, BC
Previous
Reply
Map
View

Click here to load this message in the networking platform