From e8b4bd404a83eb0224c5fe267338f84022a795f9 Mon Sep 17 00:00:00 2001 From: zhoutianliang Date: Thu, 28 Jul 2022 17:21:31 +0800 Subject: [PATCH] fix format - to ' - ' --- .../theme/components/datepicker/datepicker-adapter.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/framework/theme/components/datepicker/datepicker-adapter.ts b/src/framework/theme/components/datepicker/datepicker-adapter.ts index 08adcbb83d..c27588d81b 100644 --- a/src/framework/theme/components/datepicker/datepicker-adapter.ts +++ b/src/framework/theme/components/datepicker/datepicker-adapter.ts @@ -42,7 +42,7 @@ export class NbRangeAdapterService extends NbDatepickerAdapter { - const [start, end] = range.split('-').map(subDate => subDate.trim()); + const [start, end] = range.split(' - ').map(subDate => subDate.trim()); return { start: this.dateService.parse(start, format), end: this.dateService.parse(end, format), @@ -72,7 +72,7 @@ export class NbRangeAdapterService extends NbDatepickerAdapter subDate.trim()); + const [start, end] = range.split(' - ').map(subDate => subDate.trim()); return this.dateService.isValidDateString(start, format) && this.dateService.isValidDateString(end, format); } }