balbarak / bootstrap-hijri-datepicker

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

How to set the date in hijri date picker #12

Open Nadirdasti opened 4 years ago

Nadirdasti commented 4 years ago

how to set the date in hijri date in hijri date picker.

balbarak commented 4 years ago

you can use jquery to fill the input. and make sure the format is matching hijriFormat option default hijriFormat is iDD-iMM-iYYYY

see docs for more informaiton

mhdbashar commented 4 years ago

for your kind to clarify how to fill the input using jquery, I can add value attribute to the input but it's still empty.

Ahmed-Salah7 commented 4 years ago

go around : set value as placeholder :)

hamadaDev commented 4 years ago

same problem $('#mydateinput').val('29-08-1441'); this not make calender select the date and when open it the input go empty

balbarak commented 4 years ago

maybe you can only set the Gregorian date with the following format DD-MM-YYYY if you have not changed the default format

I will investigate more for hijri date

hamadaDev commented 4 years ago

hi my problem Solved the problem was hijri format this is work with me fine $('#mydateinput').val('30-11-2020'); $('#mydateinput_hijri').val('1441-08-29');