Datepicker: Use button instead of a link in icon trigger demo

This commit is contained in:
Felix Nagel 2015-09-02 22:46:57 +02:00
parent 430715b206
commit e6fe401329

View File

@ -18,15 +18,14 @@
} ),
widget = datepicker.datepicker( "widget" );
$( "<a href='#'>")
.append( "<img src='images/calendar.gif' tabindex='0' alt='Open Datepicker'>" )
$( "<button>" )
.append( "<img src='images/calendar.gif' alt='Open Datepicker'>" )
.insertAfter( datepicker )
.on( "click", function( event ) {
.on( "click", function() {
allowOpen = true;
if ( widget.is( ":hidden" ) ) {
datepicker.focus();
}
event.preventDefault();
});
</script>
</head>