// callbacks
change: null,
create: null,
+ refresh: null,
select: null
}
} );
step1();
} );
+QUnit.test( "refresh", function( assert ) {
+ assert.expect( 2 );
+
+ var shouldFire;
+
+ this.element.calendar( {
+ refresh: function() {
+ assert.ok( shouldFire, "refresh event fired" );
+ }
+ } );
+
+ shouldFire = true;
+ this.element.find( "button.ui-calendar-next" ).simulate( "click" );
+
+ shouldFire = false;
+ this.element.find( "table button:eq(1)" ).simulate( "click" );
+
+ testHelper.focusGrid( this.element ).simulate( "keydown", { keyCode: $.ui.keyCode.END } );
+ shouldFire = true;
+ testHelper.focusGrid( this.element ).simulate( "keydown", { keyCode: $.ui.keyCode.DOWN } );
+} );
+
} );
close: null,
create: null,
open: null,
+ refresh: null,
select: null
}
} );
step1();
} );
+QUnit.test( "refresh", function( assert ) {
+ assert.expect( 1 );
+
+ var shouldFire;
+
+ this.element.calendar( {
+ refresh: function() {
+ assert.ok( shouldFire, "refresh event fired" );
+ }
+ } );
+
+ shouldFire = true;
+ this.element.find( "button.ui-calendar-next" ).simulate( "click" );
+
+ shouldFire = false;
+ this.element.find( "table button:eq(1)" ).simulate( "click" );
+} );
+
} );
// callbacks
change: null,
+ refresh: null,
select: null
},
this._setActiveDescendant();
this._refreshHeaderButtons();
this._createButtons();
+
+ this._trigger( "refresh" );
},
_refreshHeaderButtons: function() {
change: null,
close: null,
open: null,
+ refresh: null,
select: null
},
calendarOptions: [ "buttons", "classes", "disabled", "dateFormat", "eachDay",
- "icons", "labels", "locale", "max", "min", "numberOfMonths", "showWeek" ],
+ "icons", "labels", "locale", "max", "min", "numberOfMonths", "showWeek", "refresh" ],
_create: function() {
this.suppressExpandOnFocus = false;