mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
timepicker step solve when minutes are 59
This commit is contained in:
@@ -107,6 +107,8 @@ export class EditEventPage implements OnInit {
|
||||
|
||||
ngOnInit() {
|
||||
this._postEvent = this.postEvent
|
||||
this.postEvent.StartDate = new Date(this.ajustMinuts(this.postEvent.StartDate))
|
||||
this.postEvent.EndDate = new Date(this.ajustMinuts(this.postEvent.EndDate))
|
||||
if(!this.restoreTemporaryData()) {
|
||||
// clear
|
||||
|
||||
@@ -582,4 +584,16 @@ export class EditEventPage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
ajustMinuts(string) {
|
||||
var partes = string.split(' ');
|
||||
var horaMinuto = partes[1].split(':');
|
||||
if (horaMinuto[1] === '59') {
|
||||
horaMinuto[1] = '00';
|
||||
var novaString = partes[0] + ' ' + horaMinuto.join(':');
|
||||
|
||||
return novaString;
|
||||
}
|
||||
return string;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user