score:0
you can use the onchange
callback to store the range in state and read it when clicking the button:
handleselect(range){
this.setstate({ range });
},
handleclick(){
console.log(this.state.range);
},
render:function(){
return <div>
<daterange oninit={this.handleselect}
onchange={this.handleselect} />
<button id="apply-dates" onclick={this.handleclick} >
<i classname="fa fa-check-circle"></i>
apply dates
</button>
</div>;
}
Source: stackoverflow.com
Related Query
- How to get start and end date value in React date range picker?
- React Date Picker - How to handle if user only selects the start date in range and does not selects the end date?
- Reactjs How to get the value of Start date and End date?
- How to validate End date which is less than the Start date in react and add error message in banner if the end date is less than start date in react
- How to get the first and last visible date in React Big Calendar?
- How to get value of Date Picker from Material Ui
- How to get value of Form.Control - React Bootstrap Date Picker?
- How to get date from Date Picker and show in the table? Material-UI. ReactJS
- How do I get my HTML form date input to only allow specific days of the week to be chosen using JavaScript, React and HTML?
- How to get Material-UI Date Picker value
- How to format get and format Date in DatePicker in Material UI React
- How to filter dates with a given range from a start and end date?
- How to get out of a forEach loop once a value is true using firebase and react
- How to get and modify the Date value
- React - How to correctly get the current value of a date input?
- How can I get the value of an input field and use it in URL in React
- How pass value in URL and How get value from URl in React JS
- How to make React final form 'Field' value change on date picker event?
- How to get Input value and show it on a button click in React JS
- How to get Date and Time in Firebase Timestamp in react js
- React js How to get Value within a useEffect and display on defualtValue textfield
- How to get start and end timestamps of every month in selected year
- how to set start date and end date by default in date input
- How to get buttons to the end of material ui list and checkbox to the start of the list?
- How to get starting date and current date of month in react js?
- React Antd not able to get value from custom date picker
- How can get both text and value of lookup column on React material-table?
- React MomentJS get duration from start time and end time
- How to get params from url with React front end and express backend?
- I want to disable end date picker before choosing start date picker in react js
More Query from same tag
- Importing script via script tag and using function from that script within react component
- reactjs importing imported JSON object into array-list
- How to change JSON API label into number in .net
- ReactJS, Golang server CORS content-type trouble
- How to break the tight coupling between these React Presentational Components
- hardhat, truffle, brownie, react stopped working?!? error Command failed with exit code 1
- Nginx/React/Django: CORS issue
- React - Change component by the router
- React router - How to redirect to child component if parent component path is entered in url
- Invalid token, state does not match - Auth0 Error Safari only
- 100vh does not apply when switching dynamic react components
- ReactJS - onClick change text of clicked buttons
- Why crash when try to render svg image inside button
- Material ui can't modify Popover max-height
- React useEffect inside const function with MobX
- React Hook Form Multiple Dropdown Validation
- NextJs Render Erorrs
- Navigating From One local Host to another in react js
- using the map for getting the property to disable or not
- How can i pass different props to more than one children component from the parent one in React?
- useLocation hook and Server Side Rendering error in Gatsby
- Faced module not found after I installed bootstrap
- ValidationError: Invalid options object. CSS Loader has been initialised using an options object that does not match the API schema
- Was following the ReactJS tutorial and was wondering about expanding on what it teaches
- Logic for rotating a square
- React-router v4 showing multiple routes at once
- Changing color of font in mermaid js for a single message
- data from database not returning
- React is not rendering if state is set in constructor by a function
- Styled Component (button) not working with onClick