Sha256: 699dd8f03a348c05e561ac82378e20954234ed990df9f40f6dbf8644954a1fd5

Contents?: true

Size: 1.88 KB

Versions: 23

Compression:

Stored size: 1.88 KB

Contents

module("Events",{setup:function(){this.input=$('<input type="text" value="31-03-2011">').appendTo("#qunit-fixture").datepicker({format:"dd-mm-yyyy"}).focus(),this.dp=this.input.data("datepicker"),this.picker=this.dp.picker},teardown:function(){this.picker.remove()}}),test("Selecting a year from decade view triggers pickYear",function(){var i,e=0;this.input.on("changeYear",function(){e++}),equal(this.dp.viewMode,0),i=this.picker.find(".datepicker-days thead th.switch"),ok(i.is(":visible"),"View switcher is visible"),i.click(),ok(this.picker.find(".datepicker-months").is(":visible"),"Month picker is visible"),equal(this.dp.viewMode,1),datesEqual(this.dp.viewDate,UTCDate(2011,2,31)),datesEqual(this.dp.date,UTCDate(2011,2,31)),i=this.picker.find(".datepicker-months thead th.switch"),ok(i.is(":visible"),"View switcher is visible"),i.click(),ok(this.picker.find(".datepicker-years").is(":visible"),"Year picker is visible"),equal(this.dp.viewMode,2),datesEqual(this.dp.viewDate,UTCDate(2011,2,31)),datesEqual(this.dp.date,UTCDate(2011,2,31)),i=this.picker.find(".datepicker-years tbody span:contains(2010)"),i.click(),equal(this.dp.viewMode,1),datesEqual(this.dp.viewDate,UTCDate(2010,2,1)),datesEqual(this.dp.date,UTCDate(2011,2,31)),equal(e,1)}),test("Selecting a month from year view triggers pickMonth",function(){var i,e=0;this.input.on("changeMonth",function(){e++}),equal(this.dp.viewMode,0),i=this.picker.find(".datepicker-days thead th.switch"),ok(i.is(":visible"),"View switcher is visible"),i.click(),ok(this.picker.find(".datepicker-months").is(":visible"),"Month picker is visible"),equal(this.dp.viewMode,1),datesEqual(this.dp.viewDate,UTCDate(2011,2,31)),datesEqual(this.dp.date,UTCDate(2011,2,31)),i=this.picker.find(".datepicker-months tbody span:contains(Apr)"),i.click(),equal(this.dp.viewMode,0),datesEqual(this.dp.viewDate,UTCDate(2011,3,1)),datesEqual(this.dp.date,UTCDate(2011,2,31)),equal(e,1)});

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
rearview-1.2.3-jruby public/rearview/vendor/bootstrap/plugins/bootstrap-datepicker/tests/suites/events.js
rearview-1.2.2.rc.2-jruby public/rearview/vendor/bootstrap/plugins/bootstrap-datepicker/tests/suites/events.js
rearview-1.2.2.rc.1-jruby public/rearview/vendor/bootstrap/plugins/bootstrap-datepicker/tests/suites/events.js
rearview-1.2.1-jruby public/rearview/vendor/bootstrap/plugins/bootstrap-datepicker/tests/suites/events.js
rearview-1.2.0-jruby public/rearview/vendor/bootstrap/plugins/bootstrap-datepicker/tests/suites/events.js
rearview-1.1.2-jruby public/rearview/vendor/bootstrap/plugins/bootstrap-datepicker/tests/suites/events.js
rearview-1.1.1-jruby public/rearview/vendor/bootstrap/plugins/bootstrap-datepicker/tests/suites/events.js
rearview-1.1.0-jruby public/rearview/vendor/bootstrap/plugins/bootstrap-datepicker/tests/suites/events.js
rearview-1.0.3.rc.4-jruby public/rearview/vendor/bootstrap/plugins/bootstrap-datepicker/tests/suites/events.js
rearview-1.0.3.rc.3-jruby public/rearview/vendor/bootstrap/plugins/bootstrap-datepicker/tests/suites/events.js
rearview-1.0.3.rc.2-jruby public/rearview/vendor/bootstrap/plugins/bootstrap-datepicker/tests/suites/events.js
rearview-1.0.3.rc.1-jruby public/rearview/vendor/bootstrap/plugins/bootstrap-datepicker/tests/suites/events.js
rearview-1.0.2-jruby public/rearview/vendor/bootstrap/plugins/bootstrap-datepicker/tests/suites/events.js
rearview-1.0.2.rc.4-jruby public/rearview/vendor/bootstrap/plugins/bootstrap-datepicker/tests/suites/events.js
rearview-1.0.2.rc.3-jruby public/rearview/vendor/bootstrap/plugins/bootstrap-datepicker/tests/suites/events.js
rearview-1.0.2.rc.2-jruby public/rearview/vendor/bootstrap/plugins/bootstrap-datepicker/tests/suites/events.js
rearview-1.0.2.rc.1-jruby public/rearview/vendor/bootstrap/plugins/bootstrap-datepicker/tests/suites/events.js
rearview-1.0.1-jruby public/rearview/vendor/bootstrap/plugins/bootstrap-datepicker/tests/suites/events.js
rearview-1.0.0-jruby public/rearview/vendor/bootstrap/plugins/bootstrap-datepicker/tests/suites/events.js
rearview-1.0.0.rc5-jruby public/rearview/vendor/bootstrap/plugins/bootstrap-datepicker/tests/suites/events.js