UncleCoder.com

UncleCoder.com

Free programming examples and instructions

Datetime Picker - Asp.net

Demo and Code for how to implement Date time picker in Asp.net Using JQuery-UI and Bootstrap-Datetimepicker

by Athil


Posted on 27 Jun 2018 Category: Asp.net Views: 111

Edited on 12 Jul 2019


Here I am going to show how to implement DateTime picker in asp.net using JQuery UI and Bootstrap-Datetimepicker In Asp.net.

DEMO

1. Link the following CSS and scripts in your page, You can download the scripts and CSS here

    <link href="/css/bootstrap.min.css" rel="stylesheet"/>
    <link type="text/css" rel="stylesheet" href="/css/bootstrap-datetimepicker.css" />
    <link type="text/css" rel="stylesheet" href ="/css/jquery-ui.css"/>


    <script src="/js/jquery.min.js"></script>
    <script src="/js/bootstrap.min.js"></script>
    <script src="/js/moment-with-locales.js"> </script>
    <script src ="/js/bootstrap-datetimepicker.js"></script>

2. Add one Textbox in your page

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

3. Add the following script to make text box as Datetime picker

 $(document).ready(function () {
        $('#<%=TextBox1.ClientID%>').datetimepicker();

        });

 

 



Leave a Comment: