jonthornton / Datepair.js

A javascript plugin for intelligently selecting date and time ranges, inspired by Google Calendar.
https://www.jonthornton.com/Datepair.js
359 stars 85 forks source link

Input group bug #29

Closed berwite closed 9 years ago

jonthornton commented 9 years ago

Please provide more information, and code samples if possible.

berwite commented 9 years ago
     <div id="Calendarpair">\
                               <div class="col-sm-5 col-sm-offset-1">\
                                     <div class="form-group">\
                                       <label>Start Date</label>\
                                      <div class="input-group  date start">\
                                                    <input type="text" class="form-control"/>\
                                                <span class="input-group-addon"><span class="fa fa-calendar"></span>\
                                                  </span>\
                                            </div>\
                                      </div>\
                                </div>\
                                <div class="col-sm-5">\
                                     <div class="form-group">\
                                        <label>Start Time</label>\
                                        <div class="input-group time start">\
                                                    <input type="text" class="form-control" />\
                                                 <span class="input-group-addon"><span class="fa fa-clock-o"></span>\
                                                 </span>\
                                           </div>\
                                      </div>\
                                </div>\
                                 <div class="col-sm-5 col-sm-offset-1">\
                                     <div class="form-group">\
                                       <label>End Date</label>\
                                      <div class="input-group date  end">\
                                                    <input type="text" class="form-control" />\
                                                <span class="input-group-addon"><span class="fa fa-calendar"></span>\
                                                  </span>\
                                            </div>\
                                      </div>\
                                </div>\
                                <div class="col-sm-5">\
                                     <div class="form-group">\
                                        <label>End Time</label>\
                                        <div class="input-group  time end">\
                                                    <input type="text" class="form-control" />\
                                                 <span class="input-group-addon"><span class="fa fa-clock-o"></span>\
                                                 </span>\
                                           </div>\
                                      </div>\
                                </div>\
                                 </div>\

image

its not working for me . any way thanks for the quick response :+1:

jonthornton commented 9 years ago

Where's the javascript where you're initializing the datepair?

berwite commented 9 years ago
    modal.find('#Calendarpair .time').timepicker({
                        'showDuration': true,
                        'timeFormat': 'g:ia'
                    });
    modal.find('#Calendarpair .date').datepicker({
                        'todayHighlight': true,
                        'format': 'm/d/yyyy',
                        'autoclose': true
                    });
     modal.find('#Calendarpair').datepair();
jonthornton commented 9 years ago

I don't see any problems with the javascript or HTML you posted. The problem must be somewhere else in your code.