From 7397783f269155ba5c6fcfd83fce2be965ecbd08 Mon Sep 17 00:00:00 2001 From: Matt Sgarlata Date: Thu, 20 Apr 2017 17:52:38 -0400 Subject: [PATCH] arabic support --- src/calendar.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/calendar.js b/src/calendar.js index b7595c5..5bfe9c6 100644 --- a/src/calendar.js +++ b/src/calendar.js @@ -591,7 +591,9 @@ function calendar (calendarOptions) { if (classes.contains(target, o.styles.dayDisabled) || !classes.contains(target, o.styles.dayBodyElem)) { return; } - var day = parseInt(text(target), 10); + var t = text(target) + var parsed = ref.localeData().preparse(t) + var day = parseInt(parsed, 10); var prev = classes.contains(target, o.styles.dayPrevMonth); var next = classes.contains(target, o.styles.dayNextMonth); var offset = getMonthOffset(target) - getMonthOffset(lastDayElement);