Skip to content

Commit

Permalink
Allow mock Date object in isDate() check
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesisaac committed Mar 31, 2016
1 parent 2343dce commit 043cb80
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/picker.js
Original file line number Diff line number Diff line change
Expand Up @@ -1054,10 +1054,10 @@ PickerConstructor._ = {


/**
* Tell if something is a date object.
* Tell if something resembles a date object.
*/
isDate: function( value ) {
return {}.toString.call( value ).indexOf( 'Date' ) > -1 && this.isInteger( value.getDate() )
return value.getDate && this.isInteger( value.getDate() )
},


Expand Down

0 comments on commit 043cb80

Please sign in to comment.