Мелкие доработки

This commit is contained in:
Book Pauk
2022-10-31 20:53:29 +07:00
parent 8982b3eaf0
commit 548f18430d
2 changed files with 15 additions and 2 deletions

View File

@@ -96,7 +96,14 @@ class SelectDateDialog {
this.to = this.splitDate.to;
}
isManualDate(date) {
return date && utils.isDigit(date[0]) && utils.isDigit(date[1]);
}
get splitDate() {
if (!this.isManualDate(this.date))
return {from: '', to: ''};
const [from = '', to = ''] = (this.date || '').split(',');
return {from, to};
}