You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge pull request #65 from benjamin-albert/master
Allows the user to pass an empty i18n translation. I saw new unit tests # 25 and 26 for this. Great work. All tests pass in IE 8 - IE 11 as well as Edge.
assert.equal(field.val(),'06/2016','The main field was populated correctly using the SelectedMonth option.');
646
646
assert.equal($(SecondaryAltField).val(),'06/2016',"The secondary field was populated correctly using the SelectedMonth option.");
647
-
647
+
648
648
field.MonthPicker('option','SelectedMonth',null);
649
-
649
+
650
650
assert.equal(field.val(),'','The main field was cleared by passing null to the SelectedMonth option.');
651
651
assert.equal($(SecondaryAltField).val(),'',"The secondary field was cleared by passing null to the SelectedMonth option..");
652
-
652
+
653
653
varselectedVal=field.MonthPicker('Validate');
654
654
655
655
assert.equal($('#MonthPicker_Validation_MainAltField').css('display'),'inline','A Validate API call showed a validation message about a bad date on #MainAltField.');
656
656
657
657
assert.equal(selectedVal,null,'Validate API call returned null when there was no date selected as expected.');
658
658
659
659
assert.equal(field.MonthPicker('GetSelectedMonthYear'),null,'GetSelectedMonthYear API call returned null when there was no date selected as expected.');
660
-
660
+
661
661
assert.equal($('#MonthPicker_Validation_MainAltField').css('display'),'inline','#MainAltField showed a validation message about a bad date.');
assert.ok($('#MonthPicker_Validation_MainAltField').is(':hidden'),'#MainAltField cleared the validation error message by setting the SelectedMonth option.');
666
-
666
+
667
667
});
668
668
669
669
QUnit.test('Right to left',function(assert){
@@ -994,7 +994,9 @@ QUnit.test('ShowOn both', function (assert) {
994
994
assert.notOk(menu.is(':visible'),'The menu was closed by pressing tab');
995
995
});
996
996
997
-
QUnit.test('i18n',function(assert){
997
+
QUnit.module("i18n");
998
+
999
+
QUnit.test('button',function(assert){
998
1000
assert.expect(2);
999
1001
1000
1002
$("<input />").MonthPicker({
@@ -1005,6 +1007,22 @@ QUnit.test('i18n', function (assert) {
1005
1007
}).MonthPicker('destroy');
1006
1008
});
1007
1009
1010
+
QUnit.test('empty text translation',function(assert){
0 commit comments