improved search component

This commit is contained in:
X4Lo committed 2024-05-10 10:21:20 +01:00
1 parent 60faa34363
commit ff76e3900b
6 files changed
+64 -43

No files matched your search

@@ -16,7 +16,7 @@ import {
animations: [
trigger('animateDestroy', [
state('void', style({ opacity: '0' })),
transition('* => void', animate('500ms ease')),
transition('* => void', animate('300ms ease')),
]),
],
})
@@ -45,10 +45,10 @@ export class SeenModalComponent implements OnInit {
ngOnInit(): void {
if (this.data == null) {
// ? no initial data was passed: populate date field with current date
this.watchDate = formatDate(new Date(), 'MMM dd, yyyy', 'en-US');
this.watchDate = formatDate(new Date(), 'yyyy-MM-dd', 'en-US');
} else {
// ? if data is passed, populate fields
this.watchDate = this.data.watchDate.dateFormat('yyyy-MM-dd');
this.watchDate = formatDate(new Date(this.data.watchDate), 'yyyy-MM-dd', 'en-US');
this.watchedWith = this.data.watchedWith.split(', ').join('\n');
}