Jquery time picker, .selector is not working

1

I have used time picker code from the http://www.jqueryscript.net/time-clock/Easy-Time-Selector-with-jQuery-jQuery-UI-timeselect.html

    
<link rel="stylesheet" type="text/css" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/themes/flick/jquery-ui.min.css" /> 
<script type="text/javascript" src="http://code.jquery.com/jquery-1.11.1.min.js"></script> 

<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js"></script> 

<script type="text/javascript" src="~/Scripts/date-en-US.js">&lt;/script> 
<script type="text/javascript" src="~/Scripts/jquery.ui.timeselect.js"></script>

 <script type="text/javascript">
     $(document).ready(function(){
         $('#<%=txtTimePicker.ClientID%>').timeselect({ 
             autocompleteSettings: 
                 { 
                    autoFocus: true 
                    }
         }
                );
     });
<script>

<asp:TextBox ID="txtTimePicker" runat="server" />

I am getting the following error: 0x800a01b6 - JavaScript runtime error: Object doesn't support property or method 'timeselect'

jquery
asp.net
asked on Stack Overflow Aug 13, 2015 by user3809837

2 Answers

0

this line isn't going to work

$('#<%=txtTimePicker.ClientID%>').timeselect({ 

Should probably be

$('#txtTimePicker').timeselect({ 
answered on Stack Overflow Aug 13, 2015 by DrLazer • edited Aug 13, 2015 by DrLazer
0

try this script .Hope this will help you

<!-- this should go after your </body> -->
<link rel="stylesheet" type="text/css" href="/jquery.datetimepicker.css"/ >
<script src="/jquery.js"></script>
<script src="/jquery.datetimepicker.js"></script>

add the following script on document.ready event

jQuery('#txtTimePicker').datetimepicker({
  datepicker:false,
  format:'H:i'
});
answered on Stack Overflow Aug 13, 2015 by Venkatvasan

User contributions licensed under CC BY-SA 3.0