That 40px has to include the border, padding-top, padding-bottom, and the height of the element itself. Here is the part of my code in which I have problems. And now the jQuery, after refactoring a couple of times I came up with this bit of code which will check on every change if there is a value set or not, if its not it will (re-)add the class, vice-versa. How to detect a mobile device using jQuery, Show placeholder text for input type date, Reducing 2 steps to 1step when clicked on input type=date. When I am trying type="date" input field as shown below, it shows date picker in iPhone as I expected but it doesn't show the placeholder I have given. <input placeholder="Date" class="textbox-n" type="text" onfocus=" (this.type='date')" onblur=" (this.type='text')" id="date" /> Hope this helps. Upon investigation, the following types did not correspond to placeholder attributes: date (unsupported browsers: Safari, IE) month(Not supported browsers: FireFox, Safari, IE) week (Not supported browsers: FireFox, Safari, IE) how to set placeholder in input type date. What is the best way to sponsor the creation of new hyphenation patterns for languages without them? Find centralized, trusted content and collaborate around the technologies you use most. Here's the relevant block of code in select2 . Browse other questions tagged, Where developers & technologists share private knowledge with coworkers, Reach developers & technologists worldwide. If you use mvp's method but add the onblur event to change it back to a text field so the placeholder text appears again when the input field looses focus. Browse other questions tagged, Where developers & technologists share private knowledge with coworkers, Reach developers & technologists worldwide, None of us here knows, what all those local stylesheets and scripts you are embedding there, actually contain. If you do this the placeholder text does appear. set text type input value to the stored value, there is a problem in chrome with its default date-picker, thats what the media-query is for. "Required" means you can't then clear the date and see the placeholder that you've lavished all this care on. Find centralized, trusted content and collaborate around the technologies you use most. How can we create psychedelic experiences for healthy people without drugs? {this.handleChange} dateFormat="yyyy-MM-dd" className="react-autosuggest__input" placeholderText={this.state.placeholder} selected={this . Personally I don't see any reason to use vertical padding inside input fields. Input placeholder not visible Post Gareth Duke Answered Hi all, If you have a sap.m.Input with a placeholder defined, and you set it to "enabled = false" (or "editable = false"), then the placeholder is no longer visible. To subscribe to this RSS feed, copy and paste this URL into your RSS reader. Regarding Firefox comment(s): Generally, Firefox will not show any text placeholder for inputs type date. CSS: How can i get rid of the Input box spacing problem? . Great answer! Try using Tensorflow and Numpy while solving your doubts. Delphi . What is the expected behavior? placeholder on date input. inserting (before) or adding (after) content doesn't prevent the date input value to be displayed. I'm not sure why it's happening on CodePen because it looks fine on JSBin and here on StackOverflow in the snippet you posted. All is solved. The z index of the datepicker was higher than the span but alpha 0.01 in css. I have a problem - placeholder does not appear in input in my html document. Stack Overflow for Teams is moving to its own domain! Java Learning Notes_140713 (Exception Handling), Implement custom optimization algorithms in TensorFlow/Keras, Using a 3D Printer (Flashforge Adventurer3), Boostnote Theme Design Quick Reference Table, Make placeholder visible in input where placeholder is not displayed, month(Not supported browsers: FireFox, Safari, IE), week (Not supported browsers: FireFox, Safari, IE), datetime-local (unsupported browsers: FireFox, Safari, IE). Making statements based on opinion; back them up with references or personal experience. From Angular point of view I managed to put a placeholder in input type date element. Worked for me too, adding the onfocus that @RobbieNolan has suggested worked perfecly. How can we build a space probe's computer to survive centuries of interstellar travel? The placeholder should appear in the input and above the input. HTML Training (12 Courses, 19+ Projects, 4 Quizzes)