Roo/bootstrap/form/TimeField.js
[roojs1] / Roo / bootstrap / form / TimeField.js
index af0effe..8c39274 100644 (file)
@@ -282,12 +282,8 @@ Roo.extend(Roo.bootstrap.form.TimeField, Roo.bootstrap.form.Input,  {
     {
         
         if(typeof(this.time) === 'undefined') {
-            var now = new Date();
-            Roo.log('NOW');
-            Roo.log(now.format('i'));
-            Roo.log('NEW');
-            var newMinute = Math.round(parseInt(now.format('i')) / this.minuteStep) * this.minuteStep;
-            Roo.log(newMinute);
+            this.time = new Date();
+            this.time = this.time.add(Date.MINUTE, Math.round(parseInt(this.time.format('i')) / this.minuteStep) * this.minuteStep - parseInt(this.time.format('i')));
         }
         this.time = (typeof(this.time) === 'undefined') ? new Date() : this.time;