Logo

Bootstrap Date Time Picker Examples

Enable clear and today helper buttons
Linked pickers for date range selection
Only date selection
Only time selection

      <div class="card card-custom">
       <div class="card-header">
        <h3 class="card-title">
         Bootstrap Date Time Picker Examples
        </h3>
       </div>
       <!--begin::Form-->
       <form class="form">
        <div class="card-body">
         <div class="form-group row">
          <label class="col-form-label text-right col-lg-3 col-sm-12">Minimum Setup</label>
          <div class="col-lg-4 col-md-9 col-sm-12">
           <input type="text" class="form-control" id="kt_datetimepicker_1" readonly placeholder="Select date & time"/>
          </div>
         </div>
         <div class="form-group row">
          <label class="col-form-label text-right col-lg-3 col-sm-12">Input Group Setup</label>
          <div class="col-lg-4 col-md-9 col-sm-12">
           <div class="input-group date">
            <input type="text" class="form-control" readonly placeholder="Select date & time" id="kt_datetimepicker_2"/>
            <div class="input-group-append">
             <span class="input-group-text"><i class="la la-calendar-check-o glyphicon-th"></i></span>
            </div>
           </div>
          </div>
         </div>
         <div class="form-group row">
          <label class="col-form-label text-right col-lg-3 col-sm-12">Enable Helper Buttons</label>
          <div class="col-lg-4 col-md-9 col-sm-12">
           <div class="input-group date">
            <input type="text" class="form-control" readonly value="1899-11-29 00:30" id="kt_datetimepicker_3"/>
            <div class="input-group-append">
             <span class="input-group-text">
              <i class="la la-calendar glyphicon-th"></i>
             </span>
            </div>
           </div>
           <span class="form-text text-muted">Enable clear and today helper buttons</span>
          </div>
         </div>
         <div class="form-group row">
          <label class="col-form-label text-right col-lg-3 col-sm-12">Orientation</label>
          <div class="col-lg-4 col-md-9 col-sm-12">
           <div class="input-group date mb-2" >
            <input type="text" class="form-control" placeholder="Top left" id="kt_datetimepicker_4_1"/>
            <div class="input-group-append">
             <span class="input-group-text">
              <i class="la la-check-circle-o glyphicon-th"></i>
             </span>
            </div>
           </div>
           <div class="input-group date mb-2" >
            <input type="text" class="form-control" placeholder="Top right" id="kt_datetimepicker_4_2"/>
            <div class="input-group-append">
             <span class="input-group-text">
             <i class="la la-clock-o glyphicon-th"></i>
             </span>
            </div>
           </div>

           <div class="input-group date mb-2" >
            <input type="text" class="form-control" placeholder="Bottom left" id="kt_datetimepicker_4_3"/>
            <div class="input-group-append">
             <span class="input-group-text">
              <i class="la la-check glyphicon-th"></i>
             </span>
            </div>
           </div>

           <div class="input-group date" >
            <input type="text" class="form-control" placeholder="Bottom right" id="kt_datetimepicker_4_4"/>
            <div class="input-group-append">
             <span class="input-group-text">
              <i class="la la-download glyphicon-th"></i>
             </span>
            </div>
           </div>
          </div>
         </div>
         <div class="form-group row">
          <label class="col-form-label text-right col-lg-3 col-sm-12">Meridian Format</label>
          <div class="col-lg-4 col-md-9 col-sm-12">
           <div class="input-group date" >
            <input type="text" class="form-control" placeholder="Select date and time" id="kt_datetimepicker_5"/>
            <div class="input-group-append">
             <span class="input-group-text">
             <i class="la la-calendar glyphicon-th"></i>
             </span>
            </div>
           </div>
           <span class="form-text text-muted">Linked pickers for date range selection</span>
          </div>
         </div>
         <div class="form-group row">
          <label class="col-form-label text-right col-lg-3 col-sm-12">Date Only</label>
          <div class="col-lg-4 col-md-9 col-sm-12">
           <div class="input-group date" >
            <input type="text" class="form-control" placeholder="Select date" id="kt_datetimepicker_6"/>
            <div class="input-group-append">
             <span class="input-group-text">
             <i class="la la-calendar glyphicon-th"></i>
             </span>
            </div>
           </div>
           <span class="form-text text-muted">Only date selection</span>
          </div>
         </div>
         <div class="form-group row">
          <label class="col-form-label text-right col-lg-3 col-sm-12">Time Only</label>
          <div class="col-lg-4 col-md-9 col-sm-12">
           <div class="input-group date" >
            <input type="text" class="form-control" placeholder="Select time" id="kt_datetimepicker_7"/>
            <div class="input-group-append">
             <span class="input-group-text">
             <i class="la la-calendar glyphicon-th"></i>
             </span>
            </div>
           </div>
           <span class="form-text text-muted">Only time selection</span>
          </div>
         </div>
         <div class="form-group row">
          <label class="col-form-label text-right col-lg-3 col-sm-12">Modal Demos</label>
          <div class="col-lg-4 col-md-9 col-sm-12">
           <a href="" class="btn font-weight-bold btn-light-primary" data-toggle="modal" data-target="#kt_datetimepicker_modal">Launch Modal Date Time pickers</a>
          </div>
         </div>
        </div>
        <div class="card-footer">
         <div class="row">
          <div class="col-lg-9 ml-lg-auto">
           <button type="submit" class="btn btn-success mr-2">Submit</button>
           <button type="submit" class="btn btn-secondary">Cancel</button>
          </div>
         </div>
        </div>
       </form>
       <!--end::Form-->
      </div>
      

      // Class definition

      var KTBootstrapDatetimepicker = function () {

       // Private functions
       var demos = function () {
        // minimal setup
        $('#kt_datetimepicker_1').datetimepicker({
         todayHighlight: true,
         autoclose: true,
         format: 'yyyy.mm.dd hh:ii'
        });

        $('#kt_datetimepicker_1_modal').datetimepicker({
         todayHighlight: true,
         autoclose: true,
         format: 'yyyy.mm.dd hh:ii'
        });

        // input group demo
        $('#kt_datetimepicker_2').datetimepicker({
         todayHighlight: true,
         autoclose: true,
         pickerPosition: 'bottom-left',
         format: 'yyyy/mm/dd hh:ii'
        });
        $('#kt_datetimepicker_2_modal').datetimepicker({
         todayHighlight: true,
         autoclose: true,
         pickerPosition: 'bottom-left',
         format: 'yyyy/mm/dd hh:ii'
        });

        // today button
        $('#kt_datetimepicker_3').datetimepicker({
         todayHighlight: true,
         autoclose: true,
         pickerPosition: 'bottom-left',
         todayBtn: true,
         format: 'yyyy/mm/dd hh:ii'
        });
        $('#kt_datetimepicker_3_modal').datetimepicker({
         todayHighlight: true,
         autoclose: true,
         pickerPosition: 'bottom-left',
         todayBtn: true,
         format: 'yyyy/mm/dd hh:ii'
        });

        // orientation
        $('#kt_datetimepicker_4_1').datetimepicker({
         todayHighlight: true,
         autoclose: true,
         pickerPosition: 'bottom-left',
         format: 'yyyy.mm.dd hh:ii'
        });

        $('#kt_datetimepicker_4_2').datetimepicker({
         todayHighlight: true,
         autoclose: true,
         pickerPosition: 'bottom-right',
         format: 'yyyy/mm/dd hh:ii'
        });

        $('#kt_datetimepicker_4_3').datetimepicker({
         todayHighlight: true,
         autoclose: true,
         pickerPosition: 'top-left',
         format: 'yyyy-mm-dd hh:ii'
        });

        $('#kt_datetimepicker_4_4').datetimepicker({
         todayHighlight: true,
         autoclose: true,
         pickerPosition: 'top-right',
         format: 'yyyy-mm-dd hh:ii'
        });

        $('#kt_datetimepicker_5').datetimepicker({
         format: "dd MM yyyy - HH:ii P",
         showMeridian: true,
         todayHighlight: true,
         autoclose: true,
         pickerPosition: 'bottom-left'
        });

        $('#kt_datetimepicker_6').datetimepicker({
         format: "yyyy/mm/dd",
         todayHighlight: true,
         autoclose: true,
         startView: 2,
         minView: 2,
         forceParse: 0,
         pickerPosition: 'bottom-left'
        });

        $('#kt_datetimepicker_7').datetimepicker({
         format: "hh:ii",
         showMeridian: true,
         todayHighlight: true,
         autoclose: true,
         startView: 1,
         minView: 0,
         maxView: 1,
         forceParse: 0,
         pickerPosition: 'bottom-left'
        });
       }

       return {
        // public functions
        init: function() {
         demos();
        }
       };
      }();

      jQuery(document).ready(function() {
       KTBootstrapDatetimepicker.init();
      });
     

Validation State Examples

Success! You"ve done it.
Example help text that remains unchanged.
Sorry, the date is taken. Try another date?
Example help text that remains unchanged.

       <div class="card card-custom">
        <div class="card-header">
         <div class="card-title">
          <h3 class="card-title">
           Validation State Examples
          </h3>
         </div>
        </div>
        <!--begin::Form-->
        <form class="form">
         <div class="card-body">
          <div class="form-group row">
           <label class="col-form-label text-right col-lg-3 col-sm-12">Valid State</label>
           <div class="col-lg-4 col-md-9 col-sm-12">
            <div class="input-group date">
             <input type="text" class="form-control is-valid" readonly  placeholder="Select date" id="kt_datetimepicker_1_validate"/>
             <div class="input-group-append">
              <span class="input-group-text">
              <i class="la la-calendar-check-o"></i>
              </span>
             </div>
             <div class="valid-feedback">
              Success! You"ve done it.
             </div>
            </div>
            <span class="form-text text-muted">Example help text that remains unchanged.</span>
           </div>
          </div>
          <div class="form-group row">
           <label class="col-form-label text-right col-lg-3 col-sm-12">Invalid State</label>
           <div class="col-lg-4 col-md-9 col-sm-12">
            <div class="input-group date" >
             <input type="text" class="form-control is-invalid" readonly  placeholder="Select date" id="kt_datetimepicker_2_validate"/>
             <div class="input-group-append">
              <span class="input-group-text">
              <i class="la la-calendar-check-o"></i>
              </span>
             </div>
             <div class="invalid-feedback">
              Sorry, the date is taken. Try another date?
             </div>
            </div>
            <span class="form-text text-muted">Example help text that remains unchanged.</span>
           </div>
          </div>
         </div>
         <div class="card-footer">
          <div class="row">
           <div class="col-lg-9 ml-lg-auto">
            <button type="submit" class="btn btn-primary mr-2">Submit</button>
            <button type="submit" class="btn btn-secondary">Cancel</button>
           </div>
          </div>
         </div>
        </form>
        <!--end::Form-->
       </div>
       

       // Class definition

       var KTBootstrapDatetimepicker = function () {

        // Private functions
        var demos = function () {
         // input group demo
         $('#kt_datetimepicker_1_validate, #kt_datetimepicker_2_validate').datetimepicker({
          todayHighlight: true,
          autoclose: true,
          pickerPosition: 'bottom-left',
          format: 'yyyy/mm/dd hh:ii'
         });
        }

        return {
         // public functions
         init: function() {
          demos();
         }
        };
       }();

       jQuery(document).ready(function() {
        KTBootstrapDatetimepicker.init();
       });
       

User Profile 12 messages

James Jones
Application Developer
Recent Notifications
Another purpose persuade Due in 2 Days
+28%
Would be to people Due in 2 Days
+50%
-27%
The best product Due in 2 Days
+8%

Shopping Cart

iBlender The best kitchen gadget in 2020
$ 350 for 5
SmartCleaner Smart tool for cooking
$ 650 for 4
CameraMax Professional camera for edge cutting shots
$ 150 for 3
4D Printer Manufactoring unique objects
$ 1450 for 7
MotionWire Perfect animation tool
$ 650 for 7

Select A Demo

Demo 1
Demo 2
Demo 3
Demo 4
Demo 5
Demo 6
Demo 7
Demo 8
Demo 9
Demo 10
Demo 11
Demo 12
Demo 13
Demo 14
Demo 15
Demo 16
Demo 17
Demo 18
Demo 19
Demo 20
Demo 21
Demo 22
Demo 23
Demo 24
Demo 25
Demo 26
Demo 27
Demo 28
Demo 29
Demo 30