Skip to content
Loading
0
  • Mangesh G
    0
    $(document).ready(function () {
    var maxdate = new Date();
    $("#<%=txtDate.ClientID %>").datepicker({
    showsTime: false,
    ifFormat: "%d/%m/%y ",
    daFormat: "%l;%M %p, %e %m, %Y",
    align: "BR",
    electric: false,
    maxDate: maxdate,
    singleClick: false,
    displayArea: ".siblings('.dtcDisplayArea')",
    button: ".next()"
    }); 
    0
  • 0
    I tried this but not working, @Mangesh Gaherwar
    0
  • Mangesh G
    0
    Dinesh 
     
    try CTRL+SHIFT+J an see the errors at the console
    an post here 
    0
  • 0
    No errors were Populated.Actually I Include that max date to my coding,but it is not affect my code.
    link:http://www.aspsnippets.com/Articles/jQuery-UI-DatePicker-Calendar-Example-in-ASPNet.aspx 
    0
  • Mangesh G
    0
    Share Complete ASPX Page if Possible Dinesh 
    0
  • 0
    1. <html>  
    2. <script src="Scripts/jquery-1.4.1.min.js" type="text/javascript">script>  
    3. <script src="Scripts/jquery.dynDateTime.min.js" type="text/javascript">script>  
    4. <script src="Scripts/calendar-en.min.js" type="text/javascript">script>  
    5. <link href="Styles/calendar-blue.css" rel="stylesheet" type="text/css" />  
    6. <script type="text/javascript">  
    7. $(document).ready(function () {  
    8. $("#<%=TextBox1.ClientID %>").dynDateTime({  
    9. showsTime: false,  
    10. ifFormat: "%d/%m/%y ",  
    11. daFormat: "%l;%M %p, %e %m, %Y",  
    12. align: "BR",  
    13. electric: false,  
    14. singleClick: false,  
    15. displayArea: ".siblings('.dtcDisplayArea')",  
    16. button: ".next()"  
    17. });  
    18. });  
    19. script>  
    20. <body>  
    21. <form id="form1" runat="server">  
    22. <asp:TextBox ID="TextBox1" runat="server" >asp:TextBox>  
    23. <img src="calender.png" />  
    24. form>  
    25. body>  
    26. html>  
    27.    
    Here is my code @
    Mangesh Gaherwar
    0
  • Mangesh G
    0

    0
  • Rathrola Prem Kumar
    0
    Code
    The datepicker has the maxdate property that you can set when you initialize it.
    JavaScript
    $("#datepicker").datepicker({ maxDate: new Date, minDate: new Date(2007, 6, 12) });
    Code
    Like my ans, if it helps u. Thanks :)
    0