user1445018
user1445018

Reputation: 157

jQuery fullcalendar to Persian

I want to change jquery fullcalendar to Persian calendar.

I am using this code:

   isRTL: true,
    monthNames: ['فروردين', 'ارديبهشت', 'خرداد', 'تير', 'مرداد', 'شهريور',
                'مهر', 'آبان', 'آذر', 'دي', 'بهمن', 'اسفند'],
    monthNamesShort: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'],
    dayNames: ['يکشنبه', 'دوشنبه', 'سه‌شنبه', 'چهارشنبه', 'پنجشنبه', 'جمعه', 'شنبه'],
    dayNamesShort: ['يکشنبه', 'دوشنبه', 'سه‌شنبه', 'چهارشنبه', 'پنجشنبه', 'جمعه', 'شنبه'],
    dayNamesMin: ['يکشنبه', 'دوشنبه', 'سه‌شنبه', 'چهارشنبه', 'پنجشنبه', 'جمعه', 'شنبه'],
    weekHeader: 'هفته',
    dateFormat: 'yy/mm/dd',
    firstDay: 6,

My UI has changed but may calendar is not Persian

Upvotes: 6

Views: 2587

Answers (2)

A1Gard
A1Gard

Reputation: 4168

You can use the javascripts functions and classes the good sample for use this that has convert Gregorian to Persian or reverse and render month in js follow this repository:

mpdatepicker

for example functions:

getPersianWeekDay // return persian weekday
gDate2Timestamp // Gregorian to timestamp
pDate2Timestamp // persian to timestamp
pGetLastDayMonth // for find last persian month day
ShowMonth // show a persian months
Persian2Gregorian 
Gregorian2Persian

Upvotes: 0

Mazdak B.
Mazdak B.

Reputation: 66

jalali-fullcalendar may help you. Even if you don't use PHP or Yii you can take a look and extract the methods you need.

Upvotes: 4

Related Questions