// fixs UI

This commit is contained in:
Kevin Granger
2013-10-29 17:32:57 +01:00
parent c7fe91a0a9
commit 5fa36abcaf
13 changed files with 74 additions and 91 deletions
+1 -11
View File
@@ -377,21 +377,11 @@ $( document ).ready(function() {
datepickerEnd.setCompare(true);
}
$('#datepickerExpand').click(function() {
$('#datepickerExpand').on('click',function() {
$('#datepicker').removeClass('hide');
$('#date-start').focus();
});
$('#datepickerFrom').click(function() {
$('#datepicker').removeClass('hide');
$('#date-start').focus();
});
$('#datepickerTo').click(function() {
$('#datepicker').removeClass('hide');
$('#date-end').focus();
});
$('.submitDateDay').on('click',function(e){
e.preventDefault;
setDayPeriod();
@@ -224,7 +224,7 @@
month = d.getMonth(),
currentDate = this.date.valueOf();
this.picker.find('.daterangepicker-days th:eq(1)')
.text(year+' / '+DPGlobal.dates.months[month]);
.text(year+' / '+DPGlobal.dates.months[month]).append('&nbsp;<small><i class="icon-angle-down"></i><small>');
var prevMonth = new Date(year, month-1, 28,0,0,0,0),
day = DPGlobal.getDaysInMonth(prevMonth.getFullYear(), prevMonth.getMonth());
prevMonth.setDate(day);
@@ -343,6 +343,14 @@
//reset
if (target.is('.day') && !target.is('.disabled')){
// reset process for a new range
if (start && end) {
if (!compare) {
click = 2 ;
$(".range").removeClass('range');
$(".start-selected").removeClass("start-selected");
$(".end-selected").removeClass("end-selected");
}
}
if(click === 2) {
if (compare) {
startCompare = null;
@@ -423,7 +431,6 @@
},
updateRange: function() {
console.log("update");
$("#datepicker .day").each(function(){
var date_val = parseInt($(this).data('val'),10);