In this article I will explain how to show JQuery calendar control when click on image instead of focus on textbox in asp.net.
In previous post I explained many articles relating to JQuery Datepicker in asp.net. Now I will explain how to show JQuery calendar control instead of focus on textbox using asp.net.
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Show Jquery DatePicker whenever we click on image beside of
textbox</title>
<link type="text/css" href="css/ui-lightness/jquery-ui-1.8.19.custom.css"
rel="stylesheet"
/>
<script type="text/javascript" src="js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.8.19.custom.min.js"></script>
<script type="text/javascript">
$(function()
{
$("#txtDate").datepicker({
showOn: "button",
buttonImage: "calendar.png",
buttonImageOnly: true
});
});
</script>
<style type="text/css">
.ui-datepicker { font-size:8pt !important}
</style>
</head>
<body>
<form id="form1"
runat="server">
<div>
<asp:TextBox ID="txtDate"
runat="server"/>
</div>
</form>
</body>
</html>
|
$(function()
{
$("#txtDate").datepicker({
showOn: "button",
buttonImage: "calendar.png",
buttonImageOnly: true
});
});
|
|
If you enjoyed this post, please support the blog below. It's FREE! Get the latest Asp.net, C#.net, VB.NET, jQuery, Plugins & Code Snippets for FREE by subscribing to our Facebook, Twitter, RSS feed, or by email. |
|||
Subscribe by RSS
Subscribe by Email
|
|||
|
|


Subscribe by RSS
Subscribe by Email
4 comments :
Hi suresh,
I am using jquery calender inside gridview,its working fine but the calender image displaying below textbox,i need to display that image on right side of textbox...please help me
Same issue for me to Suresh. image not displaying next right to text box
Hi Suresh,
How to implement if the webpage inherits design from a master page?
Hi Suresh,
How to open the calender on click of textbox.
Thanks in advance.