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