Topic: DatePicker passing a default value
Hey everyoneHow to pass a default value to datepicker in mdb react, I tried the defaultValue property but I don\'t know how to format the value which I am passingAny help?!Thank you in advance:)))
Add comment
Mikołaj Smoleński staff answered 7 years ago
To pass a default value You need to add a property 'defaultDate' to the DatePicker component.
For example:
var value = new Date();
<DatePicker defaultDate={value} style={{borderBottom: '1px solid #bdbdbd', height: '3rem'}} id="datepicker" textFieldStyle={{width: '100%'}} hintText="Selected date" ></DatePicker>
Regards
Closed
This topic is closed.
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Status
Closed
Specification of the issue
- User: Free
- Premium support: No
- Technology: MDB React
- MDB Version: -
- Device: -
- Browser: -
- OS: -
- Provided sample code: No
- Provided link: No