Reputation: 113
I am trying to set chart that pulls data based on an input date range, so I want to set the start and end date picker's default values to strings (i.e. "Start" "End" as opposed to "mm/dd/yyyy").
I'm currently setting up the date inputs as follows:
<input style="background-color: #2E2F30; color:white; height: 50px; width: 150px;" type="date" id="StartDateSelect">
<input style="background-color: #2E2F30; color:white; height: 50px; width: 150px;" type="date" id="EndDateSelect">
<button class="btn" style="background-color: #2E2F30; color:white; height: 50px; width: 50px;" id="RefreshButton" onclick="getDates()">></button>
Upvotes: 1
Views: 45
Reputation: 1111
Use onfocus attribute
<input type="text" class="form-control" placeholder="Start" onfocus="(this.type='date')"/>
Upvotes: 1