| | |
| | | this.autoUpdateInput = true; |
| | | this.alwaysShowCalendars = false; |
| | | this.ranges = {}; |
| | | this.isSingle = false; |
| | | |
| | | this.opens = 'right'; |
| | | if (this.element.hasClass('pull-right')) |
| | |
| | | options = $.extend(this.element.data(), options); |
| | | |
| | | //html template for the picker UI |
| | | var single = ''; |
| | | if ( options.isSingle) { |
| | | single = '-single'; |
| | | } |
| | | |
| | | if (typeof options.template !== 'string' && !(options.template instanceof $)) |
| | | options.template = '<div class="daterangepicker dropdown-menu">' + |
| | | options.template = '<div class="daterangepicker' + single + ' ' + 'dropdown-menu">' + |
| | | '<div class="calendar left">' + |
| | | '<div class="daterangepicker_input">' + |
| | | '<input class="input-mini form-control" type="text" name="daterangepicker_start" value="" />' + |
| | | '<i class="fa fa-calendar glyphicon glyphicon-calendar"><button class="date_button">기간없음</button></i>' + |
| | | '<i class="fa fa-calendar glyphicon glyphicon-calendar"></i>' + |
| | | '<div class="calendar-time">' + |
| | | '<div></div>' + |
| | | '<i class="fa fa-clock-o glyphicon glyphicon-time"></i>' + |
| | | '<i class="fa fa-clock-o glyphicon glyphicon-time" style="position: relative; left:12.3rem; bottom: 1.23rem "></i>' + |
| | | '</div>' + |
| | | '</div>' + |
| | | '<div class="calendar-table"></div>' + |
| | |
| | | } |
| | | |
| | | if (this.singleDatePicker) { |
| | | |
| | | |
| | | this.container.addClass('single'); |
| | | this.container.find('.calendar.left').addClass('single'); |
| | | this.container.find('.calendar.left').show(); |
| | | this.container.find('.calendar.right').hide(); |
| | | this.container.find('.daterangepicker_input input, .daterangepicker_input > i').hide(); |
| | | if (this.timePicker) { |
| | | this.container.find('.ranges ul').hide(); |
| | | } else { |
| | | this.container.find('.ranges').hide(); |
| | | } |
| | | this.container.find('.calendar').on('focus.daterangepicker', '.daterangepicker_input input', $.proxy(this.formInputsBlurred, this)) |
| | | //this.container.find('.ranges ul').show(); |
| | | this.container.find('.ranges').show(); |
| | | //this.container.find('.applyBtn, .cancelBtn').addClass('hide'); |
| | | //this.container.find('.ranges').on('click.daterangepicker', 'button.cancelBtn', $.proxy(this.clickCancel, this)) |
| | | //this.container.find('.applyBtn, .cancelBtn').addClass(this.buttonClasses); |
| | | //this.container.find('.cancelBtn').addClass(this.cancelClass); |
| | | //this.container.find('.applyBtn').html(this.locale.applyLabel); |
| | | //this.container.find('.cancelBtn').html(this.locale.cancelLabel); |
| | | |
| | | // if (this.timePicker) { |
| | | // this.container.find('.ranges ul').hide(); |
| | | // } else { |
| | | // this.container.find('.ranges').hide(); |
| | | // } |
| | | } |
| | | |
| | | if ((typeof options.ranges === 'undefined' && !this.singleDatePicker) || this.alwaysShowCalendars) { |
| | |
| | | this.container.find('.cancelBtn').addClass(this.cancelClass); |
| | | this.container.find('.applyBtn').html(this.locale.applyLabel); |
| | | this.container.find('.cancelBtn').html(this.locale.cancelLabel); |
| | | |
| | | // |
| | | // event listeners |
| | | // |