Alexander Nazarov (nfokz) wrote in changelog,
Alexander Nazarov
nfokz
changelog

[livejournal] r23201: LJSV-2448: Time changes to current when ...

Committer: anazarov
LJSV-2448: Time changes to current when switching date of the entry in new update.bml
U   trunk/htdocs/js/jquery/jquery.lj.entryDatePicker.js
Modified: trunk/htdocs/js/jquery/jquery.lj.entryDatePicker.js
===================================================================
--- trunk/htdocs/js/jquery/jquery.lj.entryDatePicker.js	2012-10-25 14:26:42 UTC (rev 23200)
+++ trunk/htdocs/js/jquery/jquery.lj.entryDatePicker.js	2012-10-26 07:55:22 UTC (rev 23201)
@@ -220,8 +220,8 @@
 				self._isEvent = false; //we're not a blur event
 
 				if (currentDate.getMonth() !== date.getMonth() || currentDate.getDate() !== date.getDate() || currentDate.getFullYear() !== date.getFullYear()) {
-					date.setHours(currentDate.getHours());
-					date.setMinutes(currentDate.getMinutes());
+					date.setHours(self.currentDate.getHours());
+					date.setMinutes(self.currentDate.getMinutes());
 					self._setEditDate(date);
 				}
 			});
@@ -247,7 +247,7 @@
 				}).dateEntry('setDate', this.currentDate).bind('change', this, listeners.onChangeDate);
 			} else {
 				this._dateInputs.date.bind('blur', this, listeners.onChangeDate);
-				this._dateInputs.time.bind('blur', this, listeners.onChangeTime);
+				this._dateInputs.time.bind('blur edit', this, listeners.onChangeTime);
 			}
 		},
 
@@ -336,6 +336,8 @@
 						this._startTimer();
 						this._dateInputs.custom_time.val(1);
 					}
+
+					this._dateInputs.time.trigger('edit');
 					break;
 				case 'infutureedit':
 				case 'inedit':

Tags: anazarov, js, livejournal, nfokz
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