react-bootstrap-datetimepicker
react-bootstrap-datetimepicker copied to clipboard
If i have multiple datepicker on a page, how do i get value of each ?
Is there a way to set an id for each datepicker on a page? Or how do i get the value of each?
@aaronucsd You can do it like this
// in render() method:
<DateTimeField ref="myFirstDate" />
<DateTimeField ref="mySecondDate" />
// somewhere else (in the same component)
this.refs.myFirstDate.getValue();
this.refs.mySecondDate.getValue();
Thanks! On Dec 15, 2015 2:18 AM, "Sebastian Carlsson" [email protected] wrote:
@aaronucsd https://github.com/aaronucsd You can do it like this
// in render() method:<DateTimeField ref="myFirstDate" /><DateTimeField ref="mySecondDate" />// somewhere else (in the same component)this.refs.myFirstDate.getValue();this.refs.mySecondDate.getValue();
— Reply to this email directly or view it on GitHub https://github.com/quri/react-bootstrap-datetimepicker/issues/138#issuecomment-164713551 .