You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current behavior:
NbRangePicker doesn't work when date-fns (@nebular/date-fns module) is used. However, if NbRangePicker is used without any external date library, it works well.
Expected behavior:
NbRangePicker works as expected using date-fns.
Steps to reproduce:
When first date is selected, this error is shown:
core.js:15714 ERROR RangeError: Invalid time value
at format (index.js:388)
at NbDateFnsDateService.push../node_modules/@nebular/date-fns/services/date-fns-date.service.js.NbDateFnsDateService.format (date-fns-date.service.js:50)
at NbRangeAdapterService.push../node_modules/@nebular/theme/components/datepicker/datepicker-adapter.js.NbRangeAdapterService.format (datepicker-adapter.js:76)
at NbDatepickerDirective.push../node_modules/@nebular/theme/components/datepicker/datepicker.directive.js.NbDatepickerDirective.writeInput (datepicker.directive.js:345)
at SafeSubscriber._next (datepicker.directive.js:333)
at SafeSubscriber.push../node_modules/rxjs/_esm5/internal/Subscriber.js.SafeSubscriber.__tryOrUnsub (Subscriber.js:207)
at SafeSubscriber.push../node_modules/rxjs/_esm5/internal/Subscriber.js.SafeSubscriber.next (Subscriber.js:145)
at Subscriber.push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber._next (Subscriber.js:80)
at Subscriber.push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.next (Subscriber.js:55)
at TakeWhileSubscriber.push../node_modules/rxjs/_esm5/internal/operators/takeWhile.js.TakeWhileSubscriber.nextOrComplete (takeWhile.js:39)
Thanks for reporting @jmpmscorp!
Fixed in #1291.
For the time being, you can downgrade to date-fns@2.0.0-alpha.25, then it should work without problems.
By the way, all Nebular packages should be the same version to work properly. From issue description, I can see you use @nebular/theme version 3.0.0 and other @nebular/ packages are @3.3.0.
Issue type
I'm submitting a ... (check one with "x")
Issue description
Current behavior:
NbRangePicker doesn't work when date-fns (@nebular/date-fns module) is used. However, if NbRangePicker is used without any external date library, it works well.
Expected behavior:
NbRangePicker works as expected using date-fns.
Steps to reproduce:
When first date is selected, this error is shown:
Related code:
Other information:
npm, node, OS, Browser
node: 8.15.0
npm: 6.4.1
OS: Windows 10
Browser: Chrome
Angular, Nebular
The text was updated successfully, but these errors were encountered: