Topic: How to put date in Datepicker
                  
                  master@mastersistemas.net
                  pro
                  asked 7 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 7 years ago
                    
master@mastersistemas.net pro commented 7 years ago
Good morning, has this issue been resolved in Update 4.7.1?Mikołaj Smoleński staff commented 7 years ago
It should be updated with the next release. Best Regards
                      
                      master@mastersistemas.net
                      pro
                        answered 7 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 7 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