How to set up Datepicker VS 2013

后端 未结 2 1577
天涯浪人
天涯浪人 2021-01-26 12:28

Can anyone please give me some specific steps to get a date picker working in VS 2013? From the package manager, I installed the package \"Bootstrap Datepicker

2条回答
  •  粉色の甜心
    2021-01-26 12:39

    My answer is specific to Visual Studio 2013 & Web Application


    1. Include the bootstrap-datepicker.css in "Content" Folder

    1. Modify the Bundle.config to include this line :

    The contents should look like following:

    
    
      
        
        
           
      
    
    

    1. Include the bootstrap-datepicker.js in the Scripts folder

    1. Modify the Scripts/_refernces.js to include the following:

      ///

    Or it should have automatically got updated...


    1. Include the following line in the Site.Master----> inside

      
      

    The should look like this:

    
                                   
                    
                                    
                                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    <%--Site Scripts--%>  
                                
                
            
    

    1. Now use the datepicker on the page as follows:

    <script type="text/javascript">
    $(document).ready(function () {
    $(".datepicker").datepicker();
    });
    </script>
    <asp:TextBox ID="txtOrderDate" 
    CssClass="form-control col-md-3 datepicker" runat="server" 
    data-provide="datepicker"/>
    

    Also, please don't remove the line :

    
    

    Your bootstrap nav bar with drop down menu and many more effects will fail..

提交回复
热议问题