diff --git a/src/datepicker/testing/bs-datepicker-utils.spec.ts b/src/datepicker/testing/bs-datepicker-utils.spec.ts index 5541bb082c..85411986f0 100644 --- a/src/datepicker/testing/bs-datepicker-utils.spec.ts +++ b/src/datepicker/testing/bs-datepicker-utils.spec.ts @@ -51,7 +51,7 @@ describe('daterangepicker:', () => { expect(JSON.stringify(valuesResult)).toEqual(JSON.stringify(values)); }); - xit('should update time part of source date', () => { + it('should update time part of source date', () => { const date = new Date(2019, 1, 1, 12, 30, 59, 999); copyTime(date, new Date(2020, 1, 1, 0, 0, 0, 0)); expect(date.getFullYear()).toEqual(2019); diff --git a/src/datepicker/utils/copy-time-utils.ts b/src/datepicker/utils/copy-time-utils.ts index b809ec76dc..149705f3b9 100644 --- a/src/datepicker/utils/copy-time-utils.ts +++ b/src/datepicker/utils/copy-time-utils.ts @@ -1,5 +1,5 @@ export function copyTime(sourceDate: Date, time: Date) { - if (!sourceDate || !isNaN(sourceDate.getTime())) { + if (!sourceDate || isNaN(sourceDate.getTime())) { return; }