Skip to content

Not able to bind to moment, getting TypeError: (value || "").split is not a function #355

@cyates81

Description

@cyates81

Hello,

I am using Angular 5, moment 2.20.1, Chrome 64, Mac High Sierra. I updated to version 2.7.4 and now I get the following stack trace:

Uncaught (in promise): TypeError: (value || "").split is not a function
TypeError: (value || "").split is not a function
at UtilsService.datesStringToStringArray (http://localhost:8100/build/vendor.js:44895:30)
at DatePickerService.isValidInputDateValue (http://localhost:8100/build/vendor.js:211582:45)
at DatePickerComponent.onViewDateChange (http://localhost:8100/build/vendor.js:92223:35)
at http://localhost:8100/build/vendor.js:129065:34
at SafeSubscriber.schedulerFn [as _next] (http://localhost:8100/build/vendor.js:4586:36)
at SafeSubscriber.__tryOrUnsub (http://localhost:8100/build/vendor.js:63973:16)
at SafeSubscriber.next (http://localhost:8100/build/vendor.js:63920:22)
at Subscriber._next (http://localhost:8100/build/vendor.js:63860:26)
at Subscriber.next (http://localhost:8100/build/vendor.js:63824:18)
at EventEmitter.Subject.next (http://localhost:8100/build/vendor.js:64060:25)

The only way I can prevent this is to bind to a string which is not ideal. Thanks for your help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions