Chrome bug: date inputs

by StriplingWarrior

HTML

<input class="test1" type="date" />
<br />
<input class="test2" type="date" />
<br />
<input class="test3" type="date" />
<br />
<input class="test4" type="date" />
<input class="test4" type="button" value="test"/>
<br />
<input class="test5" type="date" />
<input class="test5" type="button" value="test"/>
<br />

JavaScript

$('.test1').focus(function() {
    var t = $(this);
    t.addClass('test');    
});
$('.test2').focus(function() {
    var t = $(this);
    window.setTimeout(function() {
        t.addClass('test');    
    }, 200);
});
$('.test3').focus(function() {
    var t = $(this);
    t.addClass('test');
    // fix: add a class to the parent element.
    // don't ask me why.
    t.parent().addClass('nop');
});
$('input[type=button].test4').click(function() {
    $('input[type=date].test4').focus().addClass('test');
});
$('input[type=button].test5').click(function() {
    $('input[type=date].test5').addClass('test').focus();
});