fragaria / angular-daterangepicker

Angular.js wrapper for dangrossman/bootstrap-daterangepicker
MIT License
519 stars 372 forks source link

Incorrect work if the property singleDatePicker = true #123

Closed Sir-J closed 8 years ago

Sir-J commented 8 years ago

Incorrect work if the property singleDatePicker = true. If singleDatePicker = false work correct. Error in: if (angular.isString(val) && val.length > 0) { if (opts.singleDatePicker) { objValue = f(val); } else { x = val.split(opts.locale.separator).map(f); objValue.startDate = x[0]; objValue.endDate = x[1]; } } For correct work need change to: if (angular.isString(val) && val.length > 0) { if (opts.singleDatePicker) { objValue.startDate = f(val); } else { x = val.split(opts.locale.separator).map(f); objValue.startDate = x[0]; objValue.endDate = x[1]; } }