t1m0n / air-datepicker

Lightweight, dependency-free JavaScript datepicker.
https://air-datepicker.com
MIT License
2.65k stars 1.37k forks source link

Support Jalali Calendar #193

Open bshafiei-ir opened 7 years ago

bshafiei-ir commented 7 years ago

Hello is any way to your datepicker support jalali calendar (Persian Calendar)? thanks

t1m0n commented 7 years ago

Hi! I'm sorry but there is no way to do that, because, as I understand, there is a lot of differences with Gregorian chronology.

MR-Mostafa commented 3 years ago

Hello is any way to your datepicker support jalali calendar (Persian Calendar)? thanks

👍

MR-Mostafa commented 3 years ago

Hi! I'm sorry but there is no way to do that, because, as I understand, there is a lot of differences with Gregorian chronology.

Hi, For logic difference between these dates (jalali & gregorian) you can use: Persian Date

SudoNova commented 3 years ago

Hello, Can somebody mention what are the complications of such change in a concise way? I want to see if I can help but haven't read the source code yet.

wpV2rayNG commented 1 year ago

Hello, Can somebody mention what are the complications of such change in a concise way? I want to see if I can help but haven't read the source code yet.

This project is very complete, but it's a pity that it doesn't support the Jalali calendar! I will write a jalali DatePicker soon, but I need financial help

afz commented 1 year ago

Hi, I implemented this feature (support multi calendar including Jalali/Persian calendar) https://github.com/afz/air-datepicker

mrwcom commented 1 year ago

Hi, I implemented this feature (support multi calendar including Jalali/Persian calendar) https://github.com/afz/air-datepicker

Hello, I used the package that you changed, but it is still dated

afz commented 1 year ago

Hi, I implemented this feature (support multi calendar including Jalali/Persian calendar) https://github.com/afz/air-datepicker

Hello, I used the package that you changed, but it is still dated

Hi, Try this configuration:


new AirDatepicker('#input1', {
    calendar: 'jalali',
    direction: 'rtl',
    position: 'bottom right',
    locale: {
        days: ["یک‌شنبه", "دوشنبه", "سه‌شنبه", "چهارشنبه", "پنج‌شنبه", "آدینه", "شنبه"],
        daysShort: ["ی", "د", "س", "چ", "پ", "آ", "ش"],
        daysMin: ["ی", "د", "س", "چ", "پ", "آ", "ش"],
        months: ["فروردین", "اردیبهشت", "خرداد", "تیر", "مرداد", "شهریور", "مهر", "آبان", "آذر", "دی", "بهمن", "اسفند"],
        monthsShort: ["فروردین", "اردیبهشت", "خرداد", "تیر", "مرداد", "شهریور", "مهر", "آبان", "آذر", "دی", "بهمن", "اسفند"],
        dateFormat: 'yyyy/MM/dd',
        timeFormat: 'HH:mm',
        firstDay: 6
    }
});