Placeholder not showing
See original GitHub issue<Datepicker placeholderText="Click to select a date" selected={this.state.startDate}
The problem is that the datepicker show the date selected instead of the placeholder text. If i ever remove the selected attribute, the whole component stop working ( this behaviour is expected ). I’ve tried to change the startDate state by an empty string or an empty object and i got an error.
So i dont quite get the logic of this, the placeholder functionality is only working when the datepicker isn’t ?
Issue Analytics
- State:
- Created 7 years ago
- Reactions:9
- Comments:8
Top Results From Across the Web
input placeholder is not showing - Stack Overflow
so when the page loads then placeholder will show. <input type="tel" name="natid" id= ...
Read more >Input placeholder not visible
Hi Gareth, You can change the visibility of the placeholder text, by adding this CSS to your app: The first input, has 'enabled'...
Read more >Placeholder not appearing in textbox - HTML-CSS
I have no idea why this is happening. Placeholder shows up properly in the textbox of type “number” called Age. It seems to...
Read more >:placeholder-shown - CSS: Cascading Style Sheets | MDN
The :placeholder-shown CSS pseudo-class represents any <input> or <textarea> element that is currently displaying placeholder text.
Read more >placeholder-shown - CSS-Tricks
The :placeholder-shown pseudo-class selects the input element itself when placeholder text exists in a form input. Think of it as a nice way ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This caught me as well. The demo does not explain that the placeholder won’t appear if the date is there. But changes to null worked.
To have no date selected you should set
selected
tonull
.Can you elaborate more on how it stops working? Why is this expected?