Skip to content

Commit

Permalink
Fix: Time click/select doesn't trigger the 'onSelect' method
Browse files Browse the repository at this point in the history
  • Loading branch information
spaider88 authored Aug 4, 2017
1 parent 72933bb commit e92d400
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions jquery.simple-dtpicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -981,7 +981,7 @@
var $input = $(this);
var handler = new PickerHandler($picker, $input);

// Call a event-hanlder for onSelect
// Call a event-handler for onSelect
var func = $picker.data('onSelect');
if (func != null) {
func(handler, targetDate);
Expand Down Expand Up @@ -1083,7 +1083,13 @@
"isAnim": false,
"isOutputToInputObject": true
}, date.getFullYear(), date.getMonth(), date.getDate(), hour, min);

// Call a event-handler for onSelect
var func = $picker.data('onSelect');
if (func != null) {
var $input = $(this);
var handler = new PickerHandler($picker, $input);
func(handler, getPickedDate($picker));
}
if ($picker.data("isInline") === false && $picker.data("closeOnSelected")){
// Close a picker
ActivePickerId = -1;
Expand Down

0 comments on commit e92d400

Please sign in to comment.