balbarak / bootstrap-hijri-datepicker

Bootstrap Hijri Date picker
MIT License
56 stars 53 forks source link

Wrong gregorian date returned when hijri : true #18

Open abdumostafa opened 4 years ago

abdumostafa commented 4 years ago

I've made a hijri date picker like this:

$("#dateOfBirth").hijriDatePicker({
            hijri: true,
            showSwitcher: false
        });

When I try to get the Gregorian date to send it to my API, it returned the date - 1 day: $("#dateOfBirth").data().HijriDatePicker.date()

balbarak commented 4 years ago

Hello, make sure you upgrade to the latest version

and it should return null if there is no selected date.

Also, please note that the min support date for Hijri is 1369-03-12 and Max supported date is 1492-11-18

Thanks