nepalidatepicker-instance
Retrieve Instance
Instance
You can retrieve the instance of a NepaliDatePicker, allowing you to access and manipulate its properties. The property returns an object with information about the current state of the datepicker.
JavaScript
const nepaliDatePicker = new NepaliDatePicker('#date-picker');
// Access instance properties
const currentDay = nepaliDatePicker.currentDay;
const currentMonth = nepaliDatePicker.currentMonth;
const currentYear = nepaliDatePicker.currentYear;
const today = nepaliDatePicker.today;
// Output instance properties
console.log('Current Day:', currentDay);
console.log('Current Month:', currentMonth + 1); // Month starts from 0
console.log('Current Year:', currentYear);
console.log('Today:', today);
infoComing Soon!
- Month Name in English and Nepali
- Week Day Name in English and Nepali
- Formatted Date in English and Nepali
If you want any other properties to be added, please Open An Issue.