Click here to Skip to main content
15,892,809 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
JavaScript
<script type="text/javascript">

    $(document).ready(function () {
        $("#txt_fromdate").datepicker({
            showOn: "button",
            buttonImage: "../Images/cal.png",
            buttonImageOnly: true,
            closeText: "Close",
            changeMonth: true,
            changeYear: true,
            dateFormat: 'dd/mm/yy',
            maxDate: '30/12/2014',
            yearRange: '1950:2014'
        });
    });

    $(document).ready(function () {
        $("#txt_todate").datepicker({
            showOn: "button",
            buttonImage: "../Images/cal.png",
            buttonImageOnly: true,
            closeText: "Close",
            changeMonth: true,
            changeYear: true,
            dateFormat: 'dd/mm/yy',
            maxDate: '30/12/2014',
            yearRange: '1950:2014'
        });
    });

</script>


when i click on image then calender display but i want that instead of image calender should be
open when i click on textbox ,, how can i do this by this code
plz help me
Posted
Updated 29-Jun-14 19:59pm
v3

1 solution

The datepicker can appear when the field receives focus (showOn: "focus"), when a button is clicked (showOn: "button"), or when either event occurs (showOn: "both").
Refer:
datepicker/#option-showOn[^]
 
Share this answer
 
Comments
Abhinav S 28-Jun-14 8:13am    
5.
Peter Leow 29-Jun-14 4:47am    
Thanks Abhinav.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900