SeanMcCabe
3 Aug 2007, 3:42 AM
I believe I may have found a bug with the DateField, however it only appears in IE7, can't replicate it in FF.
I am trying to apply a DateField to a standard HTML input box in a form. When the form is the first child of the BODY element this works fine.
However if i put anything between <BODY> and <FORM ...> tags, then click on the date field icon (to show the calendar) a runtime error occurs stating "Object does not support this property or method" on line 10.
This is happening when using Ext 1.0.1a and 1.1, with the Ext Base and YUI adapters.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Untitled</title>
<link rel="stylesheet" type="text/css" href="../../ext-1.1/resources/css/ext-all.css"></link>
<link rel="stylesheet" type="text/css" href="/css/ytheme-aero.css"></link>
<script language="javascript" type="text/javascript" src="../../ext-1.1/adapter/ext/ext-base.js"></script>
<script language="javascript" type="text/javascript" src="../../ext-1.1/ext-all.js"></script>
</head>
<body>
ANY CODE OR TEXT HERE WILL CAUSE THE RUNTIME ERROR
<form action="index.php" method="post">
<input type="textbox" name="calBox" id="calBox">
<input type="submit" value="Post">
</form>
<script language="javascript" type="text/javascript">
<!--
Ext.onReady(function(){
var calendar = new Ext.form.DateField({
format: 'd/m/Y',
fieldLabel: 'Company',
name: 'company',
width:175
});
calendar.applyTo(Ext.get('calBox'));
});
// -->
</script>
</body>
</html>
Please confirm if this is just a coding problem on my behalf or if this is actually a bug.
I am trying to apply a DateField to a standard HTML input box in a form. When the form is the first child of the BODY element this works fine.
However if i put anything between <BODY> and <FORM ...> tags, then click on the date field icon (to show the calendar) a runtime error occurs stating "Object does not support this property or method" on line 10.
This is happening when using Ext 1.0.1a and 1.1, with the Ext Base and YUI adapters.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Untitled</title>
<link rel="stylesheet" type="text/css" href="../../ext-1.1/resources/css/ext-all.css"></link>
<link rel="stylesheet" type="text/css" href="/css/ytheme-aero.css"></link>
<script language="javascript" type="text/javascript" src="../../ext-1.1/adapter/ext/ext-base.js"></script>
<script language="javascript" type="text/javascript" src="../../ext-1.1/ext-all.js"></script>
</head>
<body>
ANY CODE OR TEXT HERE WILL CAUSE THE RUNTIME ERROR
<form action="index.php" method="post">
<input type="textbox" name="calBox" id="calBox">
<input type="submit" value="Post">
</form>
<script language="javascript" type="text/javascript">
<!--
Ext.onReady(function(){
var calendar = new Ext.form.DateField({
format: 'd/m/Y',
fieldLabel: 'Company',
name: 'company',
width:175
});
calendar.applyTo(Ext.get('calBox'));
});
// -->
</script>
</body>
</html>
Please confirm if this is just a coding problem on my behalf or if this is actually a bug.