<label for="start">Start date:</label>
<input type="date" id="start" name="trip-start"
value="2018-07-22"
min="2018-01-01" max="2018-12-31">
// convert Javascript Date to HTML Input
var now = new Date();
var day = ("0" + now.getDate()).slice(-2);
var month = ("0" + (now.getMonth() + 1)).slice(-2);
var hour = ("0" + (now.getHours())).slice(-2);
var min = ("0" + (now.getMinutes())).slice(-2);
var today = now.getFullYear() + "-" + month + "-" + day + "T" + hour + ":" + min;
<input id="datePicker" type="date" />
<input type="date" >
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<input id="datePicker" type="date" />
Run code snippet
Code Example |
---|
Html :: restrict file upload type angular |
Html :: emmet multiple tags |
Html :: html ul |
Html :: asp classic server show errors |
Html :: what is paragraph tag |
Html :: append html form element |
Html :: routerLinkActive in dropdown main text |
Html :: <a href="#"<div class="fab fa-instagram"</i</a |
Html :: html bulleted list |
Html :: table columns html |
Html :: infinity html entity |
Html :: html tabellen formatieren |
Html :: make all the content of body in center in html |
Html :: html circle symbol |
Html :: attribute name selection |
Html :: action attribute in form |
Html :: <= meaning |
Html :: zoom meeting widget for website |
Html :: how to make link open in new tab |
Html :: loader |
Html :: run html |
Html :: html two classes in one element |
Html :: ubuntu 17.04 vmware |
Html :: lucky draw wheel html |
Html :: frameset col html |
Html :: give html content to canavas |
Html :: what is uniswap |
Html :: nigeria naira code |
Html :: nonce in script tag |
Html :: Save current page as HTML to server |