Skip to content

Commit 4e07b30

Browse files
committed
Clear Alt Field
Call to clearing alt field added, 2 assertions added to unit tests, passes in all browsers, re-minified, bumped version to 3.0.2
1 parent ea793f9 commit 4e07b30

File tree

5 files changed

+14
-5
lines changed

5 files changed

+14
-5
lines changed

demo/MonthPicker.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "jquery-ui-month-picker",
33
"description": "jQuery UI Month Picker Plugin",
4-
"version": "3.0.1",
4+
"version": "3.0.2",
55
"license": "GPL-3.0",
66
"repository": "https://github.com/KidSysco/jquery-ui-month-picker.git",
77
"scripts": {

src/MonthPicker.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
The jQuery UI Month Picker Version 3.0.1
2+
The jQuery UI Month Picker Version 3.0.2
33
https://github.com/KidSysco/jquery-ui-month-picker/
44
55
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>

src/MonthPicker.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
The jQuery UI Month Picker Version 3.0.1
2+
The jQuery UI Month Picker Version 3.0.2
33
https://github.com/KidSysco/jquery-ui-month-picker/
44
55
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
@@ -528,6 +528,7 @@ along with this program. If not, see
528528

529529
Clear: function () {
530530
this.element.val('');
531+
this._updateAlt(0, '');
531532
this._validationMessage.hide();
532533
},
533534

test/test.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -632,6 +632,14 @@ QUnit.test('AltField and AltFormat tests', function( assert ) {
632632
field.val('11/2015').trigger('change');
633633

634634
assert.equal( $(SecondaryAltField).val(), '11/2015', 'Triggering a change event on the main field updated the secondary field');
635+
636+
field.MonthPicker('Clear');
637+
638+
assert.equal(field.val(), '', "The main field was cleared.");
639+
640+
assert.equal($(SecondaryAltField).val(), '', "The secondary field was cleared.");
641+
642+
635643
});
636644

637645
QUnit.test('Right to left', function (assert) {
@@ -1501,7 +1509,7 @@ QUnit.test('Title buttons', function (assert) {
15011509
});
15021510

15031511
/*
1504-
Here we make sure that clicling the jump years button
1512+
Here we make sure that clicking the jump years button
15051513
when in jump years mode will return the user to the year
15061514
they were when they clicked Jump years.
15071515
*/

0 commit comments

Comments
 (0)