feat: add English datepicker support and comprehensive documentation improvements

This commit adds English language support to the datepicker widget and includes major documentation enhancements with proper attribution.

New Features:
- add English language option to nepali-datepicker widget (language: 'english')
- datepicker now respects en=True field parameter for English month/day names
- automatic language detection based on DEFAULT_LANGUAGE setting

Documentation:
- add Credits section acknowledging nepali package and nepali-datepicker library
- improve FAQ formatting with proper spacing between questions

Bug Fixes:
- fix datepicker language selection logic to properly prioritize English mode
- correct nepali package attribution to opensource-nepal/py-nepali
- update nepali-datepicker GitHub link to correct repository

Technical Details:
- datepicker initialization now checks data-en attribute
- language priority: explicit ne=true > explicit en=true > default (English)
- English mode displays transliterated BS month names and Arabic numerals
This commit is contained in:
sankalp committed 2026-01-30 18:29:26 +05:45
1 parent fa255d0fcf
commit d447f456ba
2 files changed
+25 -6

No files matched your search

@@ -54,9 +54,16 @@
closeOnDateSelect: true
};
// Use Devanagari if data-ne attribute is present
if (el.dataset.ne === 'true') {
// Determine language based on data attributes
var useNepali = el.dataset.ne === 'true';
var useEnglish = el.dataset.en === 'true';
if (useNepali) {
// Devanagari digits and Nepali month/day names
options.unicodeDate = true;
} else if (useEnglish || (!useNepali && !el.dataset.ne)) {
// English month/day names and digits
options.language = 'english';
}
// Nepali Datepicker v5 exposes `element.NepaliDatePicker(options)`