Vlad Kurkin (b_vladi) wrote in changelog,
Vlad Kurkin
b_vladi
changelog

[ljcom] r11200: LJSUP-10261: Update.bml. Calendar. Selec...

Committer: vkurkin
LJSUP-10261: Update.bml. Calendar. Selection of months.
LJSUP-10286: Incorrect layout for "Edit date" on update.bml
U   trunk/htdocs/js/jquery/jquery.lj.inlineCalendar.js
Modified: trunk/htdocs/js/jquery/jquery.lj.inlineCalendar.js
===================================================================
--- trunk/htdocs/js/jquery/jquery.lj.inlineCalendar.js	2011-11-22 13:11:12 UTC (rev 11199)
+++ trunk/htdocs/js/jquery/jquery.lj.inlineCalendar.js	2011-11-22 13:18:27 UTC (rev 11200)
@@ -259,7 +259,7 @@
 				cell.addClass( styles.inactive );
 				span.html(d.getDate());
 			} else if( hasEvents || o.allRefs ) {
-				cell.removeClass( styles.inactive )
+				cell.removeClass( styles.inactive );
 				span.html( jQuery( '<a />', {
 						html: d.getDate(),
 						href: Calendar._formatDate( d, o.dayRef )
@@ -364,7 +364,7 @@
 			}
 
 			this._nodes.tbody
-				.delegate( 'td', 'mousedown', function( ev ) {
+				.delegate( 'td', 'click', function( ev ) {
 					self._cellSelectedEvent( $( this ), ev );
 				} );
 		},
@@ -373,9 +373,9 @@
 			var event = jQuery.Event( "dateChange" );
 			event.moveForward = go > 0;
 			event.switchType = Math.abs( go ) === 12 ? "year" : ( Math.abs( go ) === 1 ? "month" : null );
-			event.date = new Date( this.options.displayedMonth );
-			event.date.setMonth( event.date.getMonth() + go );
 
+			event.date = new Date(this.options.displayedMonth.getFullYear(), this.options.displayedMonth.getMonth() + go, 1);
+
 			this._nodes.root.trigger( event );
 			this._setOption( 'displayedMonth', event.date );
 		},

Tags: b_vladi, js, ljcom, vkurkin
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments