1

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>

1 Answer 1

1

Use onfocus attribute

<input type="text" class="form-control" placeholder="Start" onfocus="(this.type='date')"/> 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.