阿拉伯语日期格式为英文格式javascript

时间:2018-06-07 06:41:59

标签: javascript jquery asp.net json

我使用英语和阿拉伯语的完整日历,我添加了新的链接以查看每天的所有事件,我通过查询字符串发送日期以检索值,当日历是英文时,它工作正常但是如果用户将语言更改为阿拉伯语,它将无法正常工作,因为日历日期现在为阿拉伯语(“2018-05-31”)。我正在使用的代码如下所示:

  eventAfterAllRender: function (view) {
                $('#Manager_calendar .fc-day.fc-widget-content').each(function (i) {
                    var eventdate = $(this).data('date');
                    debugger;
                    //date = new date(date)

                    //alert(date);
                    var count = $('#Manager_calendar a.fc-event.event-on-' + eventdate).length;
                    if (count > 0) {

                        if (initialLocaleCode = 'en') {
                            $(this).append("<a class=" + "'foo'" + "onclick=" + "OpenlobiWindow(" + "'!'" + "," + "'../selfservices/Manager_CalendarDetails.aspx?ApptType=All&ApptDate=" + "" + eventdate + "'" + ")>View All</a>" + "");
                        }
                        else {
                            $(this).append("<a class=" + "'foo'" + "onclick=" + "OpenlobiWindow(" + "'!'" + "," + "'../selfservices/Manager_CalendarDetails.aspx?ApptType=All&ApptDate=" + "" + eventdate + "'" + ")>عرض الكل</a>" + "");
                        }

                    }
                });
            },

0 个答案:

没有答案