Code Monkey home page Code Monkey logo

Comments (3)

alexfauquette avatar alexfauquette commented on August 26, 2024

It's mostly because you define your custom component inside the main one whereas you should never define a component inside another one.

Here is a solution.
https://codesandbox.io/s/mui-x-date-pickers-pro-forked-x6lsc8?file=/src/App.tsx

from mui-x.

Jontii avatar Jontii commented on August 26, 2024

Thank you ! Works great !

Is there a way to know which one's of the fields in MultiInputDateRangeField is selected ?

Currently I'm using document.activeElement === startInputRef.current to know which one is selected. I was wondering if there was a better way.

from mui-x.

LukasTy avatar LukasTy commented on August 26, 2024

Is there a way to know which one's of the fields in MultiInputDateRangeField is selected ?

Currently I'm using document.activeElement === startInputRef.current to know which one is selected. I was wondering if there was a better way.

It's not a bad option. If you were to use the picker instead of the field, then you could use the onRangePositionChange callback.

I'm closing the issue as it seems that the root cause has been resolved.
If you still think that the issue is relevant - feel free to reopen it or create a new issue.

from mui-x.

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.