Closed wubin1989 closed 5 years ago
I had the same issue. The source is the block 91-97:
if (opts.singleDatePicker && objValue) {
return f(objValue);
} else if (objValue.startDate) {
return [f(objValue.startDate), f(objValue.endDate)].join(opts.locale.separator);
} else {
return '';
}
The the second condition needs to check to ensure that singleDatePicker has not been specified in the options. By replacing with the following the issue is resolved:
if (opts.singleDatePicker && objValue) {
return f(objValue);
} else if (!opts.singleDatePicker && objValue.startDate) {
return [f(objValue.startDate), f(objValue.endDate)].join(opts.locale.separator);
} else {
return '';
}
There is a pull request for this: #136
after bower install command, I installed the latest version, but I got a error from angular.js
'cannot read the property of startdate of undefined'
I could not figure out the reason, so I copied the code from the project already deployed in our server, the error disappeared.
Hope you can test the code again, and fixed the problem.