Nepali Date Picker with JS

Nepali Datepicker is a javascript plugin that allows us to choose a date from a calendar. The datepicker can be linked to any standard input field and displays the calendar when the user hovers over it. When you select the desired date or when you focus away from the field, the datepicker is hidden.

<html lang="en">
    <head>
        <title>Nepali Datepicker v3.7</title>
        <meta http-equiv="x-ua-compatible" content="ie=edge" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <meta charset="utf-8" />
        <!-- Nepali Datepicker -->
        <link href="https://nirajang.com.np/wp-content/uploads/2022/06/nepali.datepicker.min_.css" rel="stylesheet" type="text/css"/>
    </head>
    <body>
        <p>
            <input type="text" id="nepali-datepicker" placeholder="Select Nepali Date"/>
        </p>
 
        <script src="https://nirajang.com.np/wp-content/uploads/2022/06/nepali.datepicker.v3.7.min_.js" type="text/javascript"></script>
        <script type="text/javascript">
            window.onload = function() {
                var mainInput = document.getElementById("nepali-datepicker");
                mainInput.nepaliDatePicker();
            };
        </script>
    </body>
</html>

Leave a Reply

Your email address will not be published.