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 user interface has changed, but the calendar is not Persian

+5
source share
2 answers

jalali-fullcalendar can help you. Even if you are not using PHP or Yii, you can take a look and extract the methods you need.

+3
source

You can use javascripts functions and classes for a good example to use this, which converted Gregorian to Persian or vice versa, and the month of rendering in js follows this repository:

mpdatepicker

e.g. 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
0
source

All Articles