Nepali Datepicker v5.0.2


Nepali Datepicker is a pure javascript plugin that allows us to select date from an interactive calendar. The datepicker can be tied to any standard input field, and shows the calendar on focus. The datepicker is hidden after you select the desired date or when focused out of the input.







Developed by sajanmaharjan.com.np

Basic Examples
Modal

You can use datepicker in modal by using {container: "#modal-id"} parameter. The datepicker will be initialized inside the modal body. All inputs that are located inside a modal needs to be initialized using the id of the container.

{container: "#exampleModal"}



Instructions

Usage

<html lang="en">
<head>
<title>Nepali Datepicker v5.0.2</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://nepalidatepicker.sajanmaharjan.com.np/v5/nepali.datepicker/css/nepali.datepicker.v5.0.2.min.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<p>
<input type="text" id="nepali-datepicker" placeholder="Select Nepali Date"/>
</p>
<script src="https://nepalidatepicker.sajanmaharjan.com.np/v5/nepali.datepicker/js/nepali.datepicker.v5.0.2.min.js" type="text/javascript"></script>
<script type="text/javascript">
window.onload = function() {
var mainInput = document.getElementById("nepali-datepicker");
mainInput.nepaliDatePicker();
};
</script>
</body>
</html>

Bonus

The nepali.datepicker is built upon nepali.functions, so all the functions available under the nepali.functions are available to use after you include the nepali.datepicker javascript file.

Availabe NepaliFunctions (View the full documentation) Example
<script src="https://nepalidatepicker.sajanmaharjan.com.np/v5/nepali.datepicker/js/nepali.datepicker.v5.0.2.min.js" type="text/javascript"></script>
<script type="text/javascript"> console.log(NepaliFunctions.BS.GetCurrentDate()); </script>