Topic: How to put date in Datepicker
master@mastersistemas.net pro asked 6 years ago
Jakub Mandra staff answered 6 years ago
You can load initial date via `value` proeprty, but DatePicker does not provide the functionality to update date value from outside.
Best,
Jakub
Mikołaj Smoleński staff answered 6 years ago
master@mastersistemas.net pro commented 6 years ago
Good morning, has this issue been resolved in Update 4.7.1?Mikołaj Smoleński staff commented 6 years ago
It should be updated with the next release. Best Regardsmaster@mastersistemas.net pro answered 6 years ago
this.state= { dataLast: date, }
getLast = (Value) => { this.setState({dataLast: Value}); }
clear = () => { var day = Date; this.setState({dataLast: day}); }
<MDBDatePicker value={this.state.dataLast} getValue={this.getLast} className="select mt-0"/>
<Button rounded size="sm" color="white" onClick={this.clear}>Limpar</Button>
How can I set the date to the DatePicker when I click a button?
Mikołaj Smoleński staff answered 6 years ago
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- ForumUser: Pro
- Premium support: No
- Technology: MDB React
- MDB Version: 4.7.0
- Device: Desktop
- Browser: All
- OS: All
- Provided sample code: No
- Provided link: No