Support Forum Softcomplex logo
About Us  | Services  | Download  | Order  | Support  | |
| Search | Today's Posts | Stats | Board Rules | Not logged in [ Login | Register ]
go to bottom
Last active: Never

Printable Version | Subscribe | Add to Favourites   Post new thread
Author: Subject: Set date limits
rvazquezto
Junior Member

Posts: 8
Registered: 6/4/2003
Member Is Offline
posted on 7/4/2003 at 07:46 PM Reply With Quote
Set date limits


<!-- this is may code and the problem are :
when i set the down limit the days out of the range are disabled, but then month dropdownlist not, if my choice are a month out of the range, an error show
look the first date control
-->

<html>
<head>
<title>JavaScript Calendar</title>
<meta name="description" content="Javascript Calendar - cross browser date picker control">
<meta name="keywords" content="JavaScript Calendar, javascript, html, client side, netscape, explorer, IE, opera, calendar, pop, popup, timestamp, date, picker, database, control, php, asp, cgi">
<meta name="robots" content="index,follow">

<script language="JavaScript" src="../Aplic/calendar.js"></script>
<script language="JavaScript" src="../Aplic/cal_format00.js"></script>
<link rel="stylesheet" href="../Aplic/calendar.css">

</head>

<body bottommargin="15" topmargin="15" leftmargin="15" rightmargin="15" marginheight="15" marginwidth="15" bgcolor="white">

<table border="0" cellpadding="3" cellspacing="0" align="center">
<tr>
<td class="SectionText" align="center">
<font face="tahoma, verdana" size="2">
Select Date:
<input type="Text" name="input1" value="" id="input1">&nbsp;
<a href="javascript:cal1.popup();"><img src="/Test/Aplic/cal.gif" width="16" height="16" border="0" alt="Click Here to Pick up the date"></a><br>
<font face="tahoma, verdana" size="2">
Select Date:
<input type="Text" name="input2" value="" id="input2">&nbsp;
<a href="javascript:cal2.popup();"><img src="/Test/Aplic/cal.gif" width="16" height="16" border="0" alt="Click Here to Pick up the date"></a><br>
</td>
</tr>
</table>

<script language="JavaScript">
// parameters are:
// 1. initial date in string format of your choice - optional
// 2. control object for date will be returned in - required
// !!! note: second parameter value for pop-up version differs to the on page version
// 3. minimum allowed date. if number - treated as relative number of days before date in paramerer 1
// if string treated as absolute data in choosen format - optional, default - no min limit
// 4. maximum allowed date. if number - treated as relative number of days after date in parameter 1
// if string treated as absolute data in choosen format - optional, default - no min limit
// Contact the support department at contact us at http://www.softcomplex.com/support/ if any questions. Specify product title
// and your order ID
var cal1 = new calendar(null, document.getElementById('input1'),3, 5);
var cal2 = new calendar(null, document.getElementById('input2'));
</script>
</body>
</html>

<!-- the first messsage is:
Sorry, dates before 01-07-2003 are not allowed.

the second message (error) is:

Se produjo un error en tiempo de ejecucion,?Desea depurarlo?
Linea : 100
Error: El objeto no acepta esta accion

-->
View User's Profile View All Posts By User U2U Member
nik


Posts:
Registered: 1/1/1970
Member Is Offline
posted on 7/8/2003 at 09:06 AM Reply With Quote

You should make the following changes in calendar.html file:
line 101 return (LOG_SETLIMIT ? new min_date : dt_current);
should be changed by:
return (LOG_SETLIMIT ? min_date : dt_current);
View User's Profile View All Posts By User U2U Member
rvazquezto
Junior Member

Posts: 8
Registered: 6/4/2003
Member Is Offline
posted on 7/9/2003 at 07:49 PM Reply With Quote
Great!!


this work beutifull!!
View User's Profile View All Posts By User U2U Member
Post new thread

Related Links:
Product Page
Product Demonstrations Live Demos
Popup Calendar
Onpage Calendar
Modal Calendar
Product Documentation Documentation
Documenation Page
Change Log
Support Forum Technical Support
Support Forum
Customer Care System
Order Now ORDER NOW!
Add to Cart
View Cart
 

Go To Top


Powered by XMB 1.9.1 Nexus
Developed By Aventure Media & The XMB Group © 2002-2004