Change Logs
Here you can find the change logs of the package.
v2.11.0
Instance Properties Typed
latest- ๐จ fix: currentYear, currentMonth, currentDay and today are documented properties, but only instanceId was declared in the TypeScript definitions โ so following the docs produced four TS2339 errors. All five are declared now. No runtime change.
- ๐ Documented two things that were written down nowhere: today is Gregorian while currentYear, currentMonth and currentDay are Bikram Sambat, so today.getFullYear() and currentYear disagree on purpose (2026 against 2083).
- ๐ข currentMonth is zero-indexed, matching convertToNepaliDate() and event.detail.dateObject, and therefore one less than the month in the YYYY-MM-DD value written into the input.
v2.10.0
BS to AD Conversion
- ๐๏ธ New static method convertToEnglishDate(bsYear, bsMonth, bsDay) converts a Bikram Sambat date to Gregorian, completing the pair with convertToNepaliDate().
- ๐ข Both the bsMonth argument and the month it returns are 1-indexed, matching the YYYY-MM-DD strings the picker produces. Note this differs from convertToNepaliDate(), whose returned month stays 0-indexed for compatibility โ round-tripping needs a + 1.
- โ Verified by round-tripping every one of the 32,976 days in the supported window, BS 2000-09-17 to 2090-12-30.
- ๐ TypeScript definitions include the new method and a NepaliDatePicker.EnglishDate type.
v2.9.0
ES Module Build
- ๐ฆ Added a real ES module build at dist/nepali-date-picker.mjs, reachable through the import condition of a new exports map.
- ๐จ fix: the module field pointed at the UMD bundle, which contains no export statements, so tooling was told the package ships ESM when it did not.
- โ require() still resolves to the UMD build, and deep imports such as dist/nepali-date-picker.min.css keep working.
v2.8.1
BS 2062 Calendar Fix
- ๐จ fix: Baishakh 2062 is 31 days, not 30, and Jestha is 31, not 32. Every date in Jestha 2062 โ roughly 15 May to 14 June 2005 โ was reading one day out.
- ๐๏ธ Jestha 1, 2062 is AD 2005-05-15. Verified against Hamro Patro.
- โ The year still totals 365, so no other month or year is affected.
v2.8.0
TypeScript Definitions
- ๐ TypeScript definitions now ship with the package โ nothing extra to install.
- โจ Option values are literal unions, so a typo in theme or format is a compile error instead of a silent fallback.
- ๐ The nepali-date-change event is typed through HTMLElementEventMap.
v2.7.1
Conversion Range & Licence
- ๐จ fix: AD dates before 1944 converted to nonsense without raising an error. They now throw a RangeError.
- ๐จ fix: convertToNepaliDate() rejects an out-of-range month or day instead of treating month 0 as January.
- ๐ Added a LICENSE file. The package has declared MIT since 2023 but no licence text shipped with it.
v2.7.0
Performance & Fixes
- โก AD to BS conversion went from about 140ms to about 0.03ms, and no longer gets slower every year. It runs once per picker, so a page with four pickers no longer blocks for over half a second.
- ๐จ fix: setSelectedDates() and clearSelection() searched the whole document, so calling either on one picker overwrote every other picker on the page.
- ๐จ fix: clearSelection() threw if the picker had not been opened yet.
- ๐จ fix: invalid minDate and maxDate values were accepted and then silently ignored.
- ๐งน Removed two debug console.log calls that fired on every render and every close.
- ๐ฆ Package is 70% smaller โ the demo assets are no longer published.
v2.6.0
DOM Events
- ๐ Dispatches native input and change events on date selection.
- โจ New nepali-date-change custom event carrying the selected date, date object, mode and selected dates.
- โก Works with Vue, React, Angular, Alpine.js, Livewire and Svelte without extra wiring.
v2.5.0
Multiple Selection & Min/Max Dates
- โจ Multiple date selection via mode: "multiple", with array, comma, JSON or custom function output.
- ๐ ๏ธ New API methods: getSelectedDates(), setSelectedDates(), getSelectedDatesFormatted() and clearSelection().
- ๐ minDate and maxDate constraints, with minDateFormat and maxDateFormat for custom parsing.
- ๐จ Dates outside the range carry a data-disable-reason attribute for styling.
v2.4.1
Release 2.4.1
- โจ Implemented the disabled dates feature.
- ๐ Minor Bug Fixes.
v2.3.1
Release 2.3.1
- ๐จ fix: 2082 & 83 Month Days Count.
v2.2.1
Release 2.2.1
- ๐จ fix: 2081 Month Days Count.
v2.2.0
Release 2.2.0
- ๐จ Fix bug where the default click event was cancelled with e.preventDefault().
v2.1.0
Release 2.1.0
- โจ Implemented the inline calendar feature.
- ๐จ Fix bug where the current date indicator was not showing up.
- ๐ Minor Bug Fixes.
v2.0.0
Mega Update
- ๐ Bundle plugin to one js file dist/nepali-date-picker.bundle.js.
- ๐ฆ Separate js and css file build for extra configuration.
- ๐ Update Readme with new installation.
- ๐ด Remove unnecessary access to Class methods and variable.
- ๐ Bug Fixes.
v1.1.0
Release 1.1.0
- ๐จ Fix Previous and Next Button Issue
- โ Add disableAfterToday disableBeforeToday disableToday config/feature options
v1.0.0
Initial Release
- ๐ Dark Mode Support
- โก Days Format Support
- ๐ณ๐ต English and Nepali Language Support
- ๐ Date Format Support
- ๐๏ธ Remove `jQuery` Dependency
- ๐ฆ Isolated Tailwind CSS
- โจ Added English Date to Nepali Date Conversion Static Method