1

This sample code is not working:

<button id="idbtn"> 
$('#idbtn').datetimepicker();
Pierre-Jean Coudert
  • 9,109
  • 10
  • 50
  • 59
  • 1
    Have you inspected? Is the button receiving a `value` attribute with some value? The button can contain context, but the context is not coupled with the `value` property (like it seamlessly appears for type text etc inputs) – Roko C. Buljan Sep 19 '18 at 10:13

1 Answers1

0

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>
Pierre-Jean Coudert
  • 9,109
  • 10
  • 50
  • 59