Tempus Dominus without an input field

1k views Asked by At

This sample code is not working:

<button id="idbtn"> 
$('#idbtn').datetimepicker();
1

There are 1 answers

0
Pierre-Jean Coudert On BEST ANSWER

This is my current working solution:

<div id="choose_date_group"  data-target-input="nearest">
     <input type="hidden" id="choose_date_hidden" class="form-control datetimepicker-input" data-target="#choose_date_group">
     <span id="choose_date" data-target="#choose_date_group" class="btn">
          <i class="fa fa-calendar"></i>
     </span>
</div>
<script>
      $("#choose_date_group" ).datetimepicker();
      $("#choose_date").click(function(){
          $("#choose_date_group").datetimepicker('toggle');
      });
</script>