nepali-date-picker icon indicating copy to clipboard operation
nepali-date-picker copied to clipboard

cant use year and month only

Open diwakar2000 opened this issue 3 years ago • 1 comments

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);
});

diwakar2000 avatar May 18 '21 12:05 diwakar2000

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

bitcoinBandit1234 avatar Mar 09 '23 06:03 bitcoinBandit1234

Stale issue, closing.

mesaugat avatar Jun 12 '24 11:06 mesaugat