diff options
Diffstat (limited to 'tests/unit/datepicker/datepicker_test_helpers.js')
-rw-r--r-- | tests/unit/datepicker/datepicker_test_helpers.js | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/unit/datepicker/datepicker_test_helpers.js b/tests/unit/datepicker/datepicker_test_helpers.js index b683f5137..9cb63c9ec 100644 --- a/tests/unit/datepicker/datepicker_test_helpers.js +++ b/tests/unit/datepicker/datepicker_test_helpers.js @@ -14,9 +14,13 @@ TestHelpers.datepicker = { d2 = new Date(d2.getFullYear(), d2.getMonth(), d2.getDate()); equal(d1.toString(), d2.toString(), message); }, - init: function(id, options) { - $.datepicker.setDefaults($.datepicker.regional[""]); - return $(id).datepicker($.extend({showAnim: ""}, options || {})); + init: function( id, options ) { + $.datepicker.setDefaults( $.datepicker.regional[ "" ] ); + return $( id ).datepicker( $.extend( { showAnim: "" }, options || {} ) ); + }, + initNewInput: function( options ) { + var id = $( "<input>" ).appendTo( "#qunit-fixture" ); + return TestHelpers.datepicker.init( id, options ); }, onFocus: function( element, onFocus ) { var fn = function( event ){ |