trentrichardson / jQuery-Timepicker-Addon

Adds a timepicker to jQueryUI Datepicker
http://trentrichardson.com/examples/timepicker/
MIT License
2.67k stars 1.05k forks source link

datetimeRange and dateRange don't return references to the wrapped instances #816

Open joshstrange opened 9 years ago

joshstrange commented 9 years ago

timeRange works as expected but the other two don't return the array returned by "$.timepicker.handleRange".

To "fix" this for datetimeRange I've just added into our code:

$.timepicker.datetimeRange = function(startTime, endTime, options) {
  return $.timepicker.handleRange('datetimepicker', startTime, endTime, options);
};

And you can do the same for dateRange to "fix" it. It should be a 2-line fix but I don't have the time right now to follow all of the contributor steps so the line numbers are: 2097 and 2110. You can see the fix in my branch here: https://github.com/joshstrange/jQuery-Timepicker-Addon/commit/a36ba1c44e4a482b0e099cd7e87885eb19435e50