fixed locale dates

This commit is contained in:
_Bastler
2021-11-23 20:21:25 +01:00
parent 01f399e547
commit f3a7017320
8 changed files with 85 additions and 49 deletions
@@ -13,6 +13,7 @@ import { ParteyTimeslotsService } from '../../../services/partey.service';
import { ConfirmDialog } from '../../../ui/confirm/confirm.component';
import { I18nService } from './../../../services/i18n.service';
import { AuthService } from './../../../services/auth.service';
import * as moment from 'moment';
@Component({
selector: 'app-partey-timeslots',
@@ -74,7 +75,7 @@ export class ParteyTimeslotsComponent implements OnInit {
this.ownerFormControl.setValue("");
this.filter.type = "";
this.typeFormControl.setValue("");
this.filter.after = new Date().toUTCString();
this.filter.after = moment.utc().format();
this.afterFormControl.setValue(new Date());
this.searchFormControl.valueChanges.pipe(debounceTime(500)).subscribe(value => {
@@ -96,7 +97,7 @@ export class ParteyTimeslotsComponent implements OnInit {
}, (error) => { })
})
this.afterFormControl.valueChanges.subscribe((value: Date) => {
this.filter.after = value && value.toUTCString() || undefined;
this.filter.after = value && moment.utc(value).format() || undefined;
this.parteyTimeslotsService.get(this.page.page, this.page.size, this.page.sort, this.page.desc, this.filter).subscribe((data: any) => {
this.timeslots = data;
}, (error) => { })