{
if(typeof(this.time) === 'undefined') {
- var now = new Date();
- var oldMinute = parseInt(now.format('i'));
- var newMinute = Math.round(parseInt(now.format('i')) / this.minuteStep) * this.minuteStep;
- Roo.log(oldMinute);
- Roo.log(newMinute);
+ this.time = new Date();
+ Roo.log(this.time);
+ this.time = this.time.add(Date.MINUTE, Math.round(parseInt(this.time.format('i')) / this.minuteStep) * this.minuteStep - parseInt(this.time.format('i')));
+ Roo.log(this.time);
}
this.time = (typeof(this.time) === 'undefined') ? new Date() : this.time;