ソースを参照

fixed issue 412

Adam Shaw 15 年 前
コミット
1729499290
2 ファイル変更3 行追加2 行削除
  1. 2 2
      src/agenda.js
  2. 1 0
      tests/triggers.html

+ 2 - 2
src/agenda.js

@@ -357,8 +357,8 @@ function Agenda(element, options, methods, viewName) {
 	
 	function slotClick(ev) {
 		if (!view.option('selectable')) { // SelectionManager will worry about dayClick
-			var col = Math.floor((ev.pageX - bg.offset().left) / colWidth),
-				date = addDays(cloneDate(view.visStart), dit + dis*col),
+			var col = Math.min(colCnt-1, Math.floor((ev.pageX - bg.offset().left) / colWidth)),
+				date = addDays(cloneDate(view.visStart), col*dis+dit),
 				rowMatch = this.className.match(/fc-slot(\d+)/);
 			if (rowMatch) {
 				var mins = parseInt(rowMatch[1]) * options.slotMinutes,

+ 1 - 0
tests/triggers.html

@@ -21,6 +21,7 @@
 			},
 			editable: true,
 			weekMode: 'variable',
+			//isRTL: true,
 			
 			viewDisplay: function(view) {
 				console.log('viewDisplay');