9

i use the bootstrap daterangepicker (dangrossman) and Bootstrap 3. Now i want does i can the daterangepicker open with a addon-button and with clickling in the input field

my code:

<div class="form-group">
        <div class="input-group input-group-sm">
            <span class="input-group-btn">
                <button class="btn btn-default" type="button"><span class="glyphicon glyphicon-calendar"></span></button>
            </span>
                <input id="daterangepicker" class="form-control" type="text" name="daterangepickerDisplay">
        </div>
    </div>

This works.. but only when i click in the inputfield..

se88
  • 171
  • 1
  • 1
  • 9

1 Answers1

15

This worked for me:

$('#my-input').data('daterangepicker').toggle();
wazz
  • 4,953
  • 5
  • 20
  • 34
Dhivya
  • 314
  • 1
  • 6