Skip to content
This repository has been archived by the owner on Apr 13, 2022. It is now read-only.

Commit

Permalink
submit callback action if first date of double picker has been saved
Browse files Browse the repository at this point in the history
also removed/changed some single date blur/focus actions.. if that
breaks look this commit up
  • Loading branch information
kalepail committed Sep 4, 2015
1 parent 7a21023 commit c7e68c2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 24 deletions.
15 changes: 3 additions & 12 deletions dev/js/Calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,17 +162,10 @@

if (self.calIsOpen) {
self.calendarSetDates();
self.calendarClose('force');
}
});

event.stopPropagation();
});
if ($(self.selected).hasClass('dr-date-end'))
self.calendarSaveDates();

$(this.element).add('.dr-date', this.element).focus(function(event) {
$('html').one('click',function() {
if (self.calIsOpen) {
self.calendarSetDates();
self.calendarClose('force');
}
});
Expand Down Expand Up @@ -527,17 +520,15 @@
var self = this;

if (!this.calIsOpen || this.presetIsOpen || type == 'force') {
$('.dr-date', this.element).blur();
$('.dr-calendar', this.element).slideUp(200, function() {
$('.dr-day', self.element).remove();
});
} else {
$('.dr-day', this.element).remove();
}

if (type == 'switcher') {
if (type == 'switcher')
return false;
}

$('.dr-input, .dr-date', this.element).removeClass('dr-active');
$(this.element).removeClass('dr-active');
Expand Down
15 changes: 3 additions & 12 deletions public/js/Calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,17 +162,10 @@

if (self.calIsOpen) {
self.calendarSetDates();
self.calendarClose('force');
}
});

event.stopPropagation();
});
if ($(self.selected).hasClass('dr-date-end'))
self.calendarSaveDates();

$(this.element).add('.dr-date', this.element).focus(function(event) {
$('html').one('click',function() {
if (self.calIsOpen) {
self.calendarSetDates();
self.calendarClose('force');
}
});
Expand Down Expand Up @@ -527,17 +520,15 @@
var self = this;

if (!this.calIsOpen || this.presetIsOpen || type == 'force') {
$('.dr-date', this.element).blur();
$('.dr-calendar', this.element).slideUp(200, function() {
$('.dr-day', self.element).remove();
});
} else {
$('.dr-day', this.element).remove();
}

if (type == 'switcher') {
if (type == 'switcher')
return false;
}

$('.dr-input, .dr-date', this.element).removeClass('dr-active');
$(this.element).removeClass('dr-active');
Expand Down

0 comments on commit c7e68c2

Please sign in to comment.