jquerytools/jquerytools — Issue #646: JS error when input has attribute value
Author: lSeldonl
Created: 2012-02-02 13:57:31+00:00
State: open

When i set value to input field like this

I have js error "Uncaught TypeError: Cannot read property 'type' of undefined"

line 286 has error

function select(date, conf, e) {

// current value
value	= date;
currYear = date.getFullYear();
currMonth = date.getMonth();
currDay	= date.getDate();

// focus the input after selection (doesn't work in IE)
if (e.type == "click" && !$.browser.msie) {
input.focus();
}

We don't check "e" but below in code we call select without "e", thats why we try to get property type of undefined value e

// initial value
if (parseDate(input.val())) {
select(value, conf);
}