添加runat =“server”时,Daterangepicker在ASP.NET中不起作用

时间:2017-10-16 09:00:42

标签: javascript asp.net

我在asp.net中使用了jquery daterangepicker控件,但它没有工作

<script type="text/javascript">     
        $(function () {                                                  
                                            
        $("#<%=single_cal1.ClientID%>").daterangepicker();
     });
                                        
    </script>      
<div class="col-md-6 xdisplay_inputx form-group has-feedback">
                                      
<input type="text" runat="server" class="form-control has-feedback-left" id="single_cal1" placeholder="First Name" aria-describedby="inputSuccess2Status">                                        
                                    
                                        
 <span class="fa fa-calendar-o form-control-feedback left" aria-hidden="true"></span>
 <span id="inputSuccess2Status" class="sr-only">(success)</span>
 </div>

function daterangepicker Bootstrap:
<pre lang="c#">
      $('#single_cal1').daterangepicker({
		  singleDatePicker: true,
		  singleClasses: "picker_1",
		  locale: {
		    format: 'DD/MM/YYYY',
		  }
 
		}, function(start, end, label) {
		  console.log(start.toISOString(), end.toISOString(), label);
		});

帮助我!

0 个答案:

没有答案