fixed onSelect callback, when 'range' is true

This commit is contained in:
t1m0n 2016-01-22 16:59:47 +03:00
parent 57485139b3
commit 33ba830ccc
3 changed files with 3 additions and 3 deletions

View File

@ -251,7 +251,7 @@ var Datepicker;
}).join(this.opts.multipleDatesSeparator);
// Create new dates array, to separate it from original selectedDates
if (this.opts.multipleDates) {
if (this.opts.multipleDates || this.opts.range) {
dates = selectedDates.map(function(date) {
var parsedDate = datepicker.getParsedDate(date);
return new Date(parsedDate.year, parsedDate.month, parsedDate.date)

File diff suppressed because one or more lines are too long

View File

@ -251,7 +251,7 @@ var Datepicker;
}).join(this.opts.multipleDatesSeparator);
// Create new dates array, to separate it from original selectedDates
if (this.opts.multipleDates) {
if (this.opts.multipleDates || this.opts.range) {
dates = selectedDates.map(function(date) {
var parsedDate = datepicker.getParsedDate(date);
return new Date(parsedDate.year, parsedDate.month, parsedDate.date)