mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Datepicker: Use button instead of a link in icon trigger demo
This commit is contained in:
parent
430715b206
commit
e6fe401329
@ -18,15 +18,14 @@
|
|||||||
} ),
|
} ),
|
||||||
widget = datepicker.datepicker( "widget" );
|
widget = datepicker.datepicker( "widget" );
|
||||||
|
|
||||||
$( "<a href='#'>")
|
$( "<button>" )
|
||||||
.append( "<img src='images/calendar.gif' tabindex='0' alt='Open Datepicker'>" )
|
.append( "<img src='images/calendar.gif' alt='Open Datepicker'>" )
|
||||||
.insertAfter( datepicker )
|
.insertAfter( datepicker )
|
||||||
.on( "click", function( event ) {
|
.on( "click", function() {
|
||||||
allowOpen = true;
|
allowOpen = true;
|
||||||
if ( widget.is( ":hidden" ) ) {
|
if ( widget.is( ":hidden" ) ) {
|
||||||
datepicker.focus();
|
datepicker.focus();
|
||||||
}
|
}
|
||||||
event.preventDefault();
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
Loading…
Reference in New Issue
Block a user