Using BootStrap TimePicker with ASP.Net TextBox

Last Reply on May 05, 2015 06:00 AM By Mudassar

Posted on May 05, 2015 04:22 AM

how to use bootstrap timepicker in asp.net using asp.net textbox control..?

Posted on May 05, 2015 06:00 AM Modified on one year ago

HTML

<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/2.2.2/css/bootstrap.min.css" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="http://maxcdn.bootstrapcdn.com/bootstrap/2.2.2/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="http://cdn.rawgit.com/jdewit/bootstrap-timepicker/gh-pages/css/bootstrap-timepicker.min.css" />
<script type="text/javascript" src="http://cdn.rawgit.com/jdewit/bootstrap-timepicker/gh-pages/js/bootstrap-timepicker.js"></script>
<div class="input-append bootstrap-timepicker">
    <asp:TextBox ID="txtTime" runat="server" CssClass="input-small" />
    <span class="add-on"><i class="icon-time"></i></span>
    <asp:Button Text="Submit" runat="server" OnClick="Submit" />
</div>
<script type="text/javascript">
    $('[id*=txtTime]').timepicker();
</script>

Code

protected void Submit(object sender, EventArgs e)
{
    DateTime time = DateTime.Parse(Request.Form[txtTime.UniqueID]);
}

 

I agree, here is the link: https://www.e-iceblue.com/Introduce/spire-office-for-net-free.html