leapfrogtechnology / nepali-date-picker

Nepali Date Picker jQuery Plugin 🇳🇵
http://leapfrogtechnology.github.io/nepali-date-picker/demo/
ISC License
87 stars 71 forks source link

cant use year and month only #40

Closed diwakar2000 closed 5 months ago

diwakar2000 commented 3 years ago

i got the following error while using month and year only:

jquery.nepaliDatePicker.min.js:1 Uncaught ReferenceError: Missing required parameters: bsYear, bsMonth, bsDate

am i doing something wrong?? following is my code:

$(document).ready(function(){
    $('#nepaliDatepicker').nepaliDatePicker({
        dateFormat: "%y-%m",
        closeOnDateSelect: true
    });
    let nep_date = (calendarFunctions.getBsDateByAdDate(year, month, day));
    let nepMonth = calendarFunctions.getNepaliNumber(nep_date.bsMonth);
    let nepYear = calendarFunctions.getNepaliNumber(nep_date.bsYear);
    $('#nepaliDatepicker').val(nepYear+'-'+nepMonth);
});
bitcoinBandit1234 commented 1 year ago

Late response, but I just read the official docs for this and maybe the Date format is incorrect here.

mesaugat commented 5 months ago

Stale issue, closing.