Reputation: 51
handleChange: function() {
};
render: function() {
return (
<label>inputdate</label>
<input type="text" onchange={this.handleChange.bind(this)} />
<label value="10/20/2018">Outputdate</label>
);
how can I read output date value on change of inputdate
Upvotes: 0
Views: 573
Reputation: 83527
If the date is hardcoded in your component, then you don't need to get the value from the label. You just hardcode it in the handleChange()
function as well.
If the date is not hardcoded in your component, then you should be passing it in as a prop. Here you also don't need to get it's value because you can access it directly with something like this.props.outputdate
.
Upvotes: 1