Skip to content

Commit

Permalink
Clear Alt Field
Browse files Browse the repository at this point in the history
Call to clearing alt field added, 2 assertions added to unit tests,
passes in all browsers, re-minified, bumped version to 3.0.2
  • Loading branch information
KidSysco committed May 4, 2016
1 parent ea793f9 commit 4e07b30
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion demo/MonthPicker.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "jquery-ui-month-picker",
"description": "jQuery UI Month Picker Plugin",
"version": "3.0.1",
"version": "3.0.2",
"license": "GPL-3.0",
"repository": "https://github.com/KidSysco/jquery-ui-month-picker.git",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/MonthPicker.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
The jQuery UI Month Picker Version 3.0.1
The jQuery UI Month Picker Version 3.0.2
https://github.com/KidSysco/jquery-ui-month-picker/
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Expand Down
3 changes: 2 additions & 1 deletion src/MonthPicker.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
The jQuery UI Month Picker Version 3.0.1
The jQuery UI Month Picker Version 3.0.2
https://github.com/KidSysco/jquery-ui-month-picker/
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Expand Down Expand Up @@ -528,6 +528,7 @@ along with this program. If not, see

Clear: function () {
this.element.val('');
this._updateAlt(0, '');
this._validationMessage.hide();
},

Expand Down
10 changes: 9 additions & 1 deletion test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -632,6 +632,14 @@ QUnit.test('AltField and AltFormat tests', function( assert ) {
field.val('11/2015').trigger('change');

assert.equal( $(SecondaryAltField).val(), '11/2015', 'Triggering a change event on the main field updated the secondary field');

field.MonthPicker('Clear');

assert.equal(field.val(), '', "The main field was cleared.");

assert.equal($(SecondaryAltField).val(), '', "The secondary field was cleared.");


});

QUnit.test('Right to left', function (assert) {
Expand Down Expand Up @@ -1501,7 +1509,7 @@ QUnit.test('Title buttons', function (assert) {
});

/*
Here we make sure that clicling the jump years button
Here we make sure that clicking the jump years button
when in jump years mode will return the user to the year
they were when they clicked Jump years.
*/
Expand Down

0 comments on commit 4e07b30

Please sign in to comment.