I want to grab some values from text fields, these values represent dates, and are made up of three parts the year, month and day. There are two such dates, the `first` and `last` date, together they form 'bounds' to restrict a search.

When I use the following js/jquery on the HTML below I get nonsense results.

I've put the HTML and JS into Jsfiddle here <http://jsfiddle.net/grHEY/>

And copied the code below as well.

```
$(".date").click
        (
            function ()
            {
                var dateValueElement = this;
                var propertyId = dateValueElement.id;
                $(".numberBounds").filter("#"+propertyId).toggle();
                handle_date_change(dateValueElement);
            }
        );

function handle_date_change(dateValueElement){

var first_year = $(".firstYear").filter("#"+dateValueElement.id).val();
var first_month = $(".firstMonth").filter("#"+dateValueElement.id).val();
var first_day = $(".firstDay").filter("#"+dateValueElement.id).val();
var last_year = $(".lastYear").filter("#"+dateValueElement.id).val();
var last_month = $(".lastMonth").filter("#"+dateValueElement.id).val();
var last_day = $(".lastDay").filter("#"+dateValueElement.id).val();

}

```

---

```
<span style="display: inline;" class="numberBounds" id="74652">
    <input onkeyup="javascript:handle_date_change(this)" valuetype="date" id="74652" class="firstYear" value="1905" size="4" type="text">
    -<input onkeyup="javascript:handle_date_change(this)" valuetype="date" id="74652" class="firstMonth" value="08" size="2" type="text">
    -<input onkeyup="javascript:handle_date_change(this)" valuetype="date" id="74652" class="firstDay" value="07" size="2" type="text"> &lt; 
</span>
<span class="date tag half-padding margin" value="1905-08-07" id="74652">1905-08-07</span>
<span style="display: inline;" class="numberBounds" id="74652"> &lt; 
    <input onkeyup="javascript:handle_date_change(this)" valuetype="date" id="74652" class="lastYear" value="1905" size="4" type="text">
    -<input onkeyup="javascript:handle_date_change(this)" valuetype="date" id="74652" class="lastMonth" value="08" size="2" type="text">
    -<input onkeyup="javascript:handle_date_change(this)" valuetype="date" id="74652" class="lastDay" value="07" size="2" type="text">
</span>

```