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"></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'
this line isn't going to work
$('#<%=txtTimePicker.ClientID%>').timeselect({
Should probably be
$('#txtTimePicker').timeselect({
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'
});
User contributions licensed under CC BY-SA 3.0