From 0c6ff33b310af6e76838b727c3bf05f5a60175c4 Mon Sep 17 00:00:00 2001 From: James Isaac Date: Thu, 31 Mar 2016 13:35:22 +0100 Subject: [PATCH] Allow mock Date object in isDate() check --- lib/picker.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/picker.js b/lib/picker.js index bf072158..f448e948 100644 --- a/lib/picker.js +++ b/lib/picker.js @@ -1087,10 +1087,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() ) },