Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Datepicker open on link

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 325
    Comment on it
    Display datepicker on a link. Follow these steps:-
    Add jquery files:
    1) http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css
    2) http://code.jquery.com/jquery-1.10.1.js
    3) http://code.jquery.com/ui/1.10.3/jquery-ui.js
    Add a jquery function:
     $(document).ready(function() {
        $("#dp").datepicker({
            onSelect: function(dateText, inst) {
                alert(dateText);
            },
            beforeShow: function (event, ui) {
                var $link = $("#datep");
                ui.dpDiv.offset({
                    top: $link.offset().top + 10,
                    left: $link.offset().left + 10
                });
            }
        });
    $("#datep").click(function() {
        $("#dp").datepicker("show");
       // $( "#dp" ).datepicker( "option", "showAnim", "slide" );
    });
    

    });

    And here is the HTML for this:-

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: