javascript - How to get value of Date Picker from Material Ui -


if created datepicker material ui, how user's input value?

say user selects 01.01.2016-> how grab value , store variable data type date?

so far i've tried use states pass json object doesnt seem working. example:

getinitialstate: function() {     return {       startdate: null,       enddate:null         };   },  render: function() { return (       <div>           <datepicker hinttext="start date" value={this.state.startdate}  onchange={this._handlestartinput} />           <datepicker hinttext="end date" value={this.state.enddate} onchange={this._handleendinput} />       </div> );},  _handlestartinput: function(value) {     this.setstate({       startdate: value     });   },    _handleendinput: function(value) {     this.setstate({       enddate: value     });   }, 

and there can create function pulls value, right after select date, state never changes , displayed in ui.

i tried , paint 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));     } 

Comments

Popular posts from this blog

how to insert data php javascript mysql with multiple array session 2 -

multithreading - Exception in Application constructor -

windows - CertCreateCertificateContext returns CRYPT_E_ASN1_BADTAG / 8009310b -