Giter Site home page Giter Site logo

Comments (3)

carbonrider avatar carbonrider commented on May 29, 2024

Sorry, I noticed the adapter is available in @mat-datetimepicker/moment. I still have issue though. I am using follwing statement for provider

{ provide: DatetimeAdapter, useClass: MomentDatetimeAdapter, deps: [MAT_DATE_LOCALE] },

And getting following error

JobInviteComponent.html:46 ERROR TypeError: Cannot read property 'createDate' of undefined
at MomentDatetimeAdapter.push../node_modules/@mat-datetimepicker/core/fesm5/mat-datetimepicker-core.js.DatetimeAdapter.createDate (mat-datetimepicker-core.js:333)
at mat-datetimepicker-moment.js:52
at range (mat-datetimepicker-moment.js:24)
at MomentDatetimeAdapter.push../node_modules/@mat-datetimepicker/moment/fesm5/mat-datetimepicker-moment.js.MomentDatetimeAdapter.setLocale (mat-datetimepicker-moment.js:52)
at new MomentDatetimeAdapter (mat-datetimepicker-moment.js:32)
at createClass (core.js:8996)
at _createProviderInstance (core.js:8981)
at resolveDep (core.js:9100)
at createClass (core.js:9004)
at createDirectiveInstance (core.js:8881)

from mat-datetimepicker.

kuhnroyal avatar kuhnroyal commented on May 29, 2024

Your material version is probably to old/new.

from mat-datetimepicker.

carbonrider avatar carbonrider commented on May 29, 2024

Thanks @kuhnroyal for your response. I am using Angular 6.0.3

I changed the statement to

{ provide: DatetimeAdapter, useClass: MomentDatetimeAdapter }

And it worked.

from mat-datetimepicker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.