diff --git a/bower.json b/bower.json index dc45676..cbfdc16 100644 --- a/bower.json +++ b/bower.json @@ -2,7 +2,7 @@ "name": "fullcalendar", "version": "2.0.0-beta2", "devDependencies": { - "moment": "2.5.1", + "moment": "2.6.0", "jquery": "~1.10.2", "jquery-ui": "~1.10.3", "jquery-simulate": "*", diff --git a/src/moment-ext.js b/src/moment-ext.js index f6d76fb..156bfd6 100644 --- a/src/moment-ext.js +++ b/src/moment-ext.js @@ -39,6 +39,7 @@ function makeMoment(args, parseUTC, parseZone) { if (ambigDateOfMonthRegex.test(input)) { // accept strings like '2014-05', but convert to the first of the month input += '-01'; + args = [ input ]; // for when pass it on to moment's constructor isAmbigTime = true; isAmbigZone = true; } diff --git a/tests/automated/event-obj.js b/tests/automated/event-obj.js index 67c2eb5..7715aef 100644 --- a/tests/automated/event-obj.js +++ b/tests/automated/event-obj.js @@ -35,14 +35,14 @@ describe('event object creation', function() { it('doesn\'t produce an event when an invalid start', function() { init({ - start: 'asdf' + start: new Date('asdf') // we use Date constructor to avoid annoying momentjs warning }); expect(event).toBeUndefined(); }); it('doesn\'t produce an event when an invalid end', function() { init({ - end: 'asdf' + end: new Date('asdf') // we use Date constructor to avoid annoying momentjs warning }); expect(event).toBeUndefined(); });