datetime-local

<input type="datetime-local"> <input> elements of type datetime-local create input controls that let the user easily enter both a date and a time, including the year, month, and day as well as the time in hours and minutes.

by Suryar Praveen

HTML

<!doctype html>
<html lang="en">

    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
        <title>Javascript Dates</title>
        <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css" integrity="sha384-GJzZqFGwb1QTTN6wy59ffF1BuGJpLSa9DkKMp0DgiMDm4iYMj70gZWKYbI706tWS"
            crossorigin="anonymous">

        <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.24.0/moment.js"></script>
		<script src="https://momentjs.com/downloads/moment-timezone-with-data.js"></script>

       
    </head>

    <body>
        <div class="container" style="padding: 40px 40px;">
            <h2>Javascript Dates</h2>
            <div class="row">
                <div class="col">

                    <label>Date In:</label>
                    <!-- <input class="form-control" type="text" id="dateIn" spellcheck="false" value="2019-01-01"> -->
					<input class="form-control" type="datetime-local" id="dateIn" spellcheck="false" min="2017-06-01T08:30"  max="2030-06-30T16:30" value="2024-01-12T19:30"/>
					<select name="timezone" id="timezone" class="form-control">
 
</select>

                    <button class="btn btn-primary btn-sm" style="margin-top: 10px;" onclick="update()">submit</button>
                </div>
            </div>
            <div class="row" style="padding-top: 100px;">
                <div class="col">

                    <label>Date Out:</label>
                    <h4 id="dateOut"></h4>
                    
                </div>
            </div>
            <div class="row" style="padding-top: 100px;">
                <div class="col">

                    <label>Milliseconds Out:</label>
                    <h4 id="msOut"></h4>
                    
                </div>
            </div>      

 <script>
		var tzname = moment.tz.names(); // Country list
    console.log(tzname);
		const...