Bootstrap-JqueryNo Comments

default thumbnail

Bootstrap datetime picker is mostly used for selecting date and time. But bootstrap datetime picker provides date and time together. Here is a solution to disable time in datetime popup. You can get date and time separately.

HTML To Get DateTime Picker

<div class="form-group">
   <div class='input-group date' id='datetimepicker4'>
      <input type='text' class="form-control" />
      <span class="input-group-addon"><span class="glyphicon glyphicon-time"></span>
    </div>
 </div>

Javascript

  $(function() {              
        $('#datetimepicker4').datetimepicker({
           format: 'DD/MM/YYYY'
        });
    });  

Use localized formats of moment.js:

  • L for date only
  • LT for time only
  • L LT for date and time

Be the first to post a comment.

Add a comment