score:1
which version of material-ui are you using ?
by reading the doc you see that
onchange callback function that is fired when the date value changes. since there is no particular event associated with the change the first argument will always be null and the second argument will be the new date instance.
you should try adding a second param to your callbacks.
score:1
your onchange handler functions should take two parameters: event and date, where event is always null and date is the new date object.
_handlestartinput: function(event, date) {
var currentstate = this.state;
currentstate.startdate = date;
this.setstate(currentstate);
},
_handleendinput: function(event, date) {
var currentstate = this.state;
currentstate.enddate = date;
this.setstate(currentstate);
}
score:4
i tried this and i paint the console value
<datepicker container="inline" floatinglabeltext="fecha desde" onchange={(x, event) => this.setfechadesde(x,event)} defaultdate={new date()} />
and
setfechadesde(x,event){
console.log(json.stringify(event));
console.log(json.stringify(x));
}
Source: stackoverflow.com
Related Query
- How to get value of Date Picker from Material Ui
- How to get the date value from Material UI datepicker?
- How to get input value of TextField from Material UI without using onChange event?
- How to get input value of TextField from Material UI?
- How to get date from Date Picker and show in the table? Material-UI. ReactJS
- How to get value from Material UI textfield after pressing enter?
- How to get Material-UI Date Picker value
- How to get a value from DateTime picker in React?
- Trying to get date value from a Material UI Textfield
- How do I get the date value from react-datepicker to register of the react-hook-form
- How to get the value from the material select dropdown in react
- React Antd not able to get value from custom date picker
- How to get dynamically selected value from material ui autocomplete
- How to get only latest value by date from array of objects in Js?
- How to get a date value from a DatePicker in React
- How to get parameter value from query string?
- How to get pasted value from Reactjs onPaste event
- React Hooks - How to get parameter value from query string
- React Formik Material UI Autocomplete: How can I populate value inside of autocomplete from localStorage?
- How to get value from Select/Option component from Ant design
- How to get value from a react function within a react component
- How to show empty date picker in Material UI- REACT?
- How to use react ref to get value from html select element?
- How to get weeks/ days/ hours/ minutes ago from custom date & time "from now" in React Native?
- How to disable past dates from today date with Material ui reactjs?
- How to get value from Multiple Checkbox to array in react?
- How to get Material UI Icon SVG path? React Icon Picker
- How to get numeric value from Reanmited Value?
- How can I get the value from an animated or interpolated value in React Native?
- how to get the key of a selected value from a dropdown in reactjs?
More Query from same tag
- Create multiline jsx inside a function
- How to add more props into useController in React Hook Form with TypeScript?
- How to display loading indicator during async call
- React DnD - "Cannot have two HTML5 backends at the same time."
- React hooks problem with passing value || defaultValue and updating counter
- Listening for ReactContext variable changes in consumer component
- Why there is 2 setState's available
- Antd - is there anyway to change background color of the Card title?
- ReactJS - Export modules from main file
- Observable timer: return action after timer finished
- How to integrate Script tag into a body tag at end in an SPFX
- React Navigation 3.x Require cycle warning
- Is it possible to access state variable outside of react render function?
- How to store an object with separate properties in Redux
- Best practice for emitting an event to another component in the same container?
- Calling solidity functions to reactJS
- mobx-state-tree error while converting to anonymousModel
- React Router 4 No Match with nested Routes
- Rendering React Components based on array object id
- Why can't I change my input value in React?
- Material UI Popper over TextField how to keep popper open if the popper options are selected
- Is there a way to infer the types of a specific value from an interface passed as a generic?
- Material-UI Slider not drag when loading component from a switch
- How to access parent component state in child component?
- Array - What's the best way to check a value exists in one of the array elements (React / JS)
- React - How can I import all my components into one
- How to align left for Item1 and align right for Item2 & Item3 with MUI React?
- Passing a function as a prop in react, Cannot read property 'edit' of undefined
- React hooks onHover modal on each array item
- AWS S3 presigned url with React uploads empty file