Code Monkey home page Code Monkey logo

Comments (4)

nzbin avatar nzbin commented on June 25, 2024

Can you provide an online example?

from extensions.

angelaki avatar angelaki commented on June 25, 2024

Just cloned your repo and just needed to change that single line:

Replace it with provideLuxonDatetimeAdapter and you'll notice that from now on you need to pass the exact format on input while with the provideMomentDatetimeAdapter the input gets parsed / auto-corrected.

from extensions.

nzbin avatar nzbin commented on June 25, 2024

The date formats of moment and luxon are different. You can't just replace the provide* API. Please check the issue #141

export const MTX_LUXON_DATETIME_FORMATS: MtxDatetimeFormats = {
parse: {
dateInput: 'D',
monthInput: 'LLLL',
yearInput: 'yyyy',
datetimeInput: 'f',
timeInput: 't',
},
display: {
dateInput: 'D',
monthInput: 'LLLL',
yearInput: 'yyyy',
datetimeInput: 'f',
timeInput: 't',
monthYearLabel: 'yyyy',
dateA11yLabel: 'DDD',
monthYearA11yLabel: 'LLLL yyyy',
popupHeaderDateLabel: 'ccc, dd LLL',
},
};

from extensions.

angelaki avatar angelaki commented on June 25, 2024

@nzbin yeah, sorry. Should have noted that format doesn't make a difference. If you just put provideMomentDatetimeAdapter() (falling back to default settings) vs. provideLuxonDatetimeAdapter() (same) Moment works but Luxon doesn't.

from extensions.

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.