Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
532 views
in Technique[技术] by (71.8m points)

localization - Non-Gregorian Calendar with jQuery FullCalendar

Does anyone know how can one add a non-gregorian calendar support to jquery FullCalendar? For example Persian Calendar (Jalalai or Shamsi calendar).

I don't know where to start the customization and what exact classes and scripts are affected by such a feature. I have implemented conversion script in js.

I think that there isn't any built-in support. I'm looking for solution so that I myself can implement it myself.

Jalali calendar (Persian):

  • 12 month
  • 6 first months are 31 days
  • 5 next months are 30 days
  • The last month is 29 or 30 days based on being leap year.
  • The year starts on first day of spring.
  • Today date is 23/05/1389 == 16/08/2010

Thank you,

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

This fork is fullcalendar version 2.1.1 with support of Persian Jalali calendar.

Everything is like fullcalendar mainline but:

For persian jalali calendar to be enabled you have to just use "lang:'persianJalali'" in your fullcalendar object definition. It is added by me and it is not in mainline of fullcalendar development yet. and it has no interfere with any other fullcalendar configuration object.

Becareful of using "lang:fa" because it does not convert fullcalendar to Jalali format, it just translates default fullcalendar to persian language as it does before. I used "viewRender" and "eventAfterAllRender" fullcalendar object elements for this conversion so PLEASE BE CAREFUL FOR OVERRIDING THEM. I even used this pwt-datpicker jquery library for my date conversions so it is my fork new dependancy so add it before using this fork.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...