Explorar o código

upgrade to moment 2.6, test changes, bugfix

Adam Shaw %!s(int64=11) %!d(string=hai) anos
pai
achega
1d23d6ff8a
Modificáronse 3 ficheiros con 4 adicións e 3 borrados
  1. 1 1
      bower.json
  2. 1 0
      src/moment-ext.js
  3. 2 2
      tests/automated/event-obj.js

+ 1 - 1
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": "*",

+ 1 - 0
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;
 		}

+ 2 - 2
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();
 	});