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); } }