Topic: How to set placeholder in MDBDatePicker? Shows current date by default.
Nitin.Chanana free asked 6 years ago
How to set placeholder in MDBDatePicker? It shows current date by default. We want to show "Select Date" as a place holder.
Nirmal Singh free answered 3 years ago
It does not work on my project too. My code:
< MDBDatePicker disableFuture={true} emptyLabel="Select Date" value={null} name="uc_pwk_received" />
Piotr Glejzer staff commented 3 years ago
Do you have a pro version?
Nirmal Singh free commented 3 years ago
yes, I do have a pro version
Krzysztof Wilk staff commented 3 years ago
Hi!
Try to use valueDefault={null}
instead of value={null}
and everything should work :)
Best regards
Jakub Mandra staff answered 6 years ago
Could you provide snippet with more code, please?
This solution was tested few times on different environments and was not causing any problems yet.
Jakub Mandra staff answered 6 years ago
Hi there,
To set text placeholder set value={null} and emptyLabel="Your text"
Nitin.Chanana free commented 6 years ago
Hi, Thank you for your reply. We tried this but it does not work.
Our code:
<DatePicker className="datepick" value={null} emptyLabel="Select Date"/>
It still shows current date as default placeholder.
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- ForumUser: Free
- Premium support: No
- Technology: MDB React
- MDB Version: 4.8.4
- Device: Laptop
- Browser: Google Chrome
- OS: Windows 10
- Provided sample code: No
- Provided link: No
Nitin.Chanana free commented 6 years ago
Can anyone please advise? It is very urgent.