PDA

View Full Version : Date field month/year dropdown has badly formed HTML



quilleashm
18 Jun 2007, 2:09 AM
Hi all,

Using Ext 1.1 Beta1 with Ext base adapter.

I tried out the date field using the following code...



<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head><link rel="stylesheet" type="text/css" href="/Spark/extjs/css/ext-all.css"/><script type="text/javascript" src="/Spark/extjs/ext-base.js"></script><script type="text/javascript" src="/Spark/extjs/ext-all-debug.js"></script>

<title>Spark Web
</title>

</head>

<body><input id="j_id7" type="text" />
<script type="text/javascript">
Ext.onReady( function(){
var dateField = new Ext.form.DateField({});
dateField.applyTo( "j_id7" );
});
</script>

</body>

</html>


Which works fine except when I click the drop down arrow to bring up the month/year picker I get an error about invalid HTML when setting innerHTML. (Line 3211 in the ext-all-debug.js file).

The HTML it is trying to change looks like this. Note the comment where a missing </tr> should be.



<table border="0" cellspacing="0">
<tr>
<td class="x-date-mp-month"><a href="#">Jan</a></td>
<td class="x-date-mp-month x-date-mp-sep"><a href="#">Jul</a></td>
<td class="x-date-mp-ybtn" align="center"><a class="x-date-mp-prev"></a></td>
<td class="x-date-mp-ybtn" align="center"><a class="x-date-mp-next"></a></td>
<!-- MISSING close of tr element here I think -->
<tr>
<td class="x-date-mp-month"><a href="#">Feb</a></td>
<td class="x-date-mp-month x-date-mp-sep"><a href="#">Aug</a></td>
<td class="x-date-mp-year"><a href="#"></a></td>
<td class="x-date-mp-year"><a href="#"></a></td>
</tr>
<tr>
<td class="x-date-mp-month"><a href="#">Mar</a></td>
<td class="x-date-mp-month x-date-mp-sep"><a href="#">Sep</a></td>
<td class="x-date-mp-year"><a href="#"></a></td>
<td class="x-date-mp-year"><a href="#"></a></td>
</tr>
<tr>
<td class="x-date-mp-month"><a href="#">Apr</a></td>
<td class="x-date-mp-month x-date-mp-sep"><a href="#">Oct</a></td>
<td class="x-date-mp-year"><a href="#"></a></td>
<td class="x-date-mp-year"><a href="#"></a></td>
</tr>
<tr>
<td class="x-date-mp-month"><a href="#">May</a></td>
<td class="x-date-mp-month x-date-mp-sep"><a href="#">Nov</a></td>
<td class="x-date-mp-year"><a href="#"></a></td>
<td class="x-date-mp-year"><a href="#"></a></td>
</tr>
<tr>
<td class="x-date-mp-month"><a href="#">Jun</a></td>
<td class="x-date-mp-month x-date-mp-sep"><a href="#">Dec</a></td>
<td class="x-date-mp-year"><a href="#"></a></td>
<td class="x-date-mp-year"><a href="#"></a></td>
</tr>
<tr class="x-date-mp-btns">
<td colspan="4">
<button type="button" class="x-date-mp-ok"> OK </button>
<button type="button" class="x-date-mp-cancel">Cancel</button>
</td>
</tr>
</table>


Cheers.

Mike.

jack.slocum
18 Jun 2007, 3:19 AM
Thanks I will make the correction for beta 2.