You must Sign In to post a response.
  • Category: ASP.NET

    Pick time from asp.net textboxes

    i am having two textboxes named 'txtlogintime' and 'txtlogouttime' in a web forms(asp.net). i want to pick the time(or show a timepicker) when i click on textbox.
  • #769235

    There are various ways to collect time picker and use it in asp.net application
    1. use bootstrap
    2. use JQuery time picker
    3. use asp.net community timepicker
    see below sample of bootstrap
    in aspx


    <div class="input-group bootstrap-timepicker timepicker">
    <asp:TextBox ID="txtTime" data-provide="timepicker" CssClass="form-control timepicker" runat="server"></asp:TextBox>
    <span class="input-group-addon"><i class="glyphicon glyphicon-time"></i></span>

    in script

    <script>
    $(function () {
    $("#txtTime").timepicker({
    showInputs: false //Set showInputs to false
    });
    })
    </script>

    hope it helps


    Thanks
    Koolprasd2003
    Editor, DotNetSpider MVM
    Microsoft MVP 2014 [ASP.NET/IIS]


  • Sign In to post your comments