can3p (can3p) wrote in changelog,
can3p
can3p
changelog

[ljcom] r11011: LJSUP-9478: Admin tool for headers

Committer: dpetrov
LJSUP-9478: Admin tool for headers
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-09-16 07:47:17 UTC (rev 11010)
+++ trunk/htdocs/js/jquery/jquery.lj.inlineCalendar.js	2011-09-16 08:24:54 UTC (rev 11011)
@@ -34,7 +34,8 @@
  *  Events:
  *  - daySelected: Event is triggered when user selects a day in the calendar. The second parameter passed to the
  *  function is a Date object.
- *  - dateChange
+ *  - dateChange Event is triggered when user click on next or prev month/year button.
+ *  - currentDateChange: Events is triggered when a new date is set in calendar as current.
  *
  *  Consistent options ( setting these options is guaranteed to work correctly ):
  *  - currentDate, date - Set/get current date.
@@ -398,7 +399,7 @@
 		 */
 		_cellSelected: function( date ) {
 			var event = jQuery.Event( "daySelected" );
-			this._nodes.root.trigger( event, [ date ] );
+			this._nodes.root.trigger( event, [ date, this._formatDate(date, this.options.dateFormat) ] );
 
 			if( !event.isDefaultPrevented() ) {
 				this._setOption( 'currentDate', date );
@@ -458,6 +459,11 @@
 			switch( name ) {
 				case 'currentDate':
 					this.options.currentDate = this._fitDate( value );
+
+					var event = jQuery.Event("currentDateChange"),
+						date = new Date(this.options.currentDate);
+					this._nodes.root.trigger( event, [ date, this._formatDate(date, this.options.dateFormat) ] );
+
 					this._setOption( 'displayedMonth', value );
 					break;
 				case 'activeFrom':

Tags: can3p, js, ljcom
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