Last Reply on Dec 19, 2011 10:43 PM By Adnaan

Views: 1534   Replies: 2  Answers: 1
Joined: Nov 15, 2011 02:51 AM
Location:  
mumbai
India  India
Asked: 47
Answered: 3
Attempted: 6

I am referring to

http://www.jqueryfaqs.com/Questions/Trigger-jQuery-UI-DatePicker-with-Image-Icon.aspx

I want to attach date select event handler to the jQuery UI DatePicker

 

Software Developer at Excelasoft


Joined: Nov 11, 2011 05:52 PM
Location:  
India 
Answered: 2714
Attempted: 3555
0

check this. Click demo button to see it working

 

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js" type = "text/javascript"></script>
    <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js" type = "text/javascript"></script> 
    <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel = "Stylesheet" type="text/css" /> 
    <script type = "text/javascript">
        $(function () {
            $("#txtDate").datepicker({
                onSelect: function (date, obj) {
                    alert("You selected: " + date);
                },
                showOn: 'button',
                buttonImageOnly: true,
                buttonImage: 'http://jqueryui.com/demos/datepicker/images/calendar.gif'
            });
        });
    </script>
</head>
<body>
    <form id="form1">
      <input type = "text" id = "txtDate" />
    </form>
</body>
</html>

Demo

MVP ASP.Net

© 2013 www.aspforums.net All rights reserved. Powered by Excelasoft Solutions.  Excelasoft Solutions

Disclaimer: This site is started with intent to serve the ASP.Net Community by providing forums (question-answer) site where people can help each other. The content posted here is free for public and is the content of its poster. The site does not provide any warranties for the posted content. If you feel any content is violating any terms please contact.
Google+ | FaceBook | Glossary
Google