Linked Questions

0 votes
1 answer
112 views

How can I display a placeholder for input type=date? [duplicate]

let dueDate = document.getElementById('dueDate') dueDate.innerHTML = "date" <input type="date" id="dueDate" placeholder="Date" class="dueDate"></input> I have this simple input ...
user avatar
1948 votes
66 answers
1.9m views

How to detect a mobile device using jQuery

Is there a way to detect whether or not a user is using a mobile device in jQuery? Something similar to the CSS @media attribute? I would like to run a different script if the browser is on a handheld ...
11 votes
8 answers
69k views

Show placeholder text for input type date

Placeholder does not work for input type date and datetime-local directly. <input type="date" placeholder="Date" /> <input type="datetime-local" placeholder=&...
Elyor's user avatar
  • 5,574
6 votes
6 answers
22k views

How to add placeholder <input type="datetime-local"> field?

I've been trying to add placeholder in input type='datetime-local' field but it doesn't work at all. Use css for solving the issue but still unable to do it :( input[type="datetime-local"]:...
Zeeshan Cornelius's user avatar
1 vote
5 answers
11k views

Date field does not appear properly In react

I have one input field whose type is date and placeholder is "Enter your date". But what happened was placeholder does not show up in the mobile app. (we are building the mobile app using html, css, ...
gates's user avatar
  • 4,515
2 votes
2 answers
9k views

How do I change the input type="date" placeholder value in Angular?

I have come across this and found many solutions but none fits my issue. <input type="date" #evtDate required name="evtDate" placeholder="Select Event Date" id="evtDate" formControlName="eventDate"...
Abhishek's user avatar
  • 2,004
12 votes
3 answers
1k views

Reducing 2 steps to 1step when clicked on input type=date

So I am using input type="date" in cordova type mobile application. For some reason, placeholder won't show up if the input type is date. So an empty button like thing appears, when clicked calendar ...
gates's user avatar
  • 4,515
0 votes
1 answer
2k views

Change the input type on focus in angular

<input type = "text" (focus)="this.type='date'"> Changing the input type when the user focuses on input field, default type is text. For example this works in plain javascript, the type ...
yerakaso's user avatar
0 votes
2 answers
902 views

Remove the default placeholder dd/mm/yyyy in Next Ui/tailwind input element of type=date

Using Next js and Next Ui input element with type="date" the way I'm using, it will result a text/placeholder of dd/mm/yyyy over the label! as shown below: My component code is simple and ...
Dreamer64's user avatar
  • 1,035
0 votes
1 answer
395 views

Set attributes of SplitDateTimeField

I have a form which I build dynamically based on data provided by the user using crispy-forms. For certain types of data, I want to provide a SplitDateTimeField to the user. I wanted to add attributes ...
Balizok's user avatar
  • 974
0 votes
1 answer
503 views

HTML5 date type missing placeholder hack

Placeholder="date" can be used in type="date" input, so I found this snippet <input placeholder="Date" class="textbox-n" type="text" onfocus="(this.type='date')" onblur="(this.type='text')" id="...
Aaron Swartz's user avatar
0 votes
1 answer
373 views

how to hide the default placeholder dd/mm/yyyy in the input type date?

I need to remove the default placeholder in the date input type i have done like this <input id="date-picker" ref="dateEle" v-model="selectedDate" type="date"...
Ashly Antony Babu's user avatar
1 vote
2 answers
92 views

CSS requires required tag on input, but shouldn't

I am working in Google Chrome at the moment, which is important. I have some CSS and jQuery that create cute 'placeholders' (actually they're labels but they start off looking like placeholders) that ...
HumanHickory's user avatar
0 votes
0 answers
190 views

placeholder being shown when clicking on another field ionic

Hello guys I have a input field with type date. Now the problem that I'm facing is that on my computer it shows the default placeholder mm/dd/yyyy on my desktop but on the mobile view it doesn't shows ...
Gardezi's user avatar
  • 2,762
0 votes
1 answer
60 views

Changing type of input from text to date and backwards doesn't work in mobile Safari

I faced with problem, when I have to set placeholder text to input[type="date"]. I've tried this method, but in mobile Safari this doen't work. Here if fast JsFiddle DEMO Here if this part of code:...
Johnny Juarez's user avatar

15 30 50 per page