Get value from datepicker
See original GitHub issueHi there, I’m successfully created a datepicker using the solution from issue #177, which I modified become like this
class App extends React.Component {
constructor(){
super();
this.handleDateChange = this.handleDateChange.bind(this);
}
handleDateChange(e){
this.setState({roomData: { ...this.state.roomData, date: e.currentTarget.value }})
}
componentDidMount () {
$('.datepicker').pickadate({
selectMonths: true, // Creates a dropdown to control month
selectYears: 15 // Creates a dropdown of 15 years to control year
});
}
render () {
let today = new Date().toISOString().split("T")[0];
let _this = this;
return (
<Input type='date' className='datepicker' data-value={today} onChange={this.handleDateChange}/>
)
}
};
Now how can I get the value of the set date from it? The onChange handler doesn’t seem to work
Issue Analytics
- State:
- Created 6 years ago
- Comments:10 (6 by maintainers)
Top Results From Across the Web
Getting value from JQUERY datepicker - Stack Overflow
The #datepickerID part is the ID of the text field containing the selected date, and .val() is a function that grabs the value...
Read more >How do I get the value of a datepicker? - MDBootstrap
How do I get the value of the datepicker and timepicker? I'm using Jquery and can't find int he documentation where it tells...
Read more >jQuery UI Datepicker getDate() Method - GeeksforGeeks
jQuery UI Datepicker getDate() method is used to get the date from the date field. Syntax: var a = $( ".selector" ).datepicker( "getDate"...
Read more >Get the value from a datepicker field - jQuery Forum
So i'm using a datepicker field and i'm trying to send the value to a db through a button field but it is...
Read more >Datepicker selected value - StackBlitz
can be found in the LICENSE file at http:/ /angular.io/license -->.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

PR https://github.com/react-materialize/react-materialize/pull/261
Please try
react-materialize3.xand reopen if this is still happening, thanks!