Date Picker does not appear

Asked

Viewed 535 times

2

Is the following I am trying to show a date Picker in a form but it does not appear my question is the following is possible to put the date Picker in a bootstrap modal? is that I outside the modal can use the date Picker inside and that I can’t

I leave image of the modal!! Imagem do Modal

1 answer

0


Well I don’t know how your modal is, but you can do so.

<!-- Button to trigger modal -->
<a href="#myModal" role="button" class="btn" data-toggle="modal">Launch demo modal</a>

<!-- Modal -->
<div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
    <h3 id="myModalLabel">Modal header</h3>
  </div>
  <div class="modal-body">
    <div id="datetimepicker1" class="input-append date">
      <input data-format="dd/MM/yyyy hh:mm:ss" type="text"></input>
      <span class="add-on"><i data-time-icon="icon-time" data-date-icon="icon-calendar"></i></span>
    </div>
  </div>
  <div class="modal-footer">
    <button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
  </div>
</div>

And put at the end of the pagin, before closing the tag body:

<script type="text/javascript">
    $(function () {
        $('#datetimepicker1').datetimepicker({
            language: 'pt-BR'
        });
    });
</script>
  • You tested it and it worked?

  • yes, see how https://codepen.io/Sinetheta/pen/Ftjwiworks

  • 'Cause I see but then I don’t know what I’m doing wrong

  • you are using the datepicker itself for the right bootstrap?

  • Probably the problem is my date Picker

  • What is the Picker date I should use so you can tell me?

  • @Shider try using this version here: https://github.com/uxsolutions/bootstrap-datepicker

Show 2 more comments

Browser other questions tagged

You are not signed in. Login or sign up in order to post.