aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorCa-Phun Ung <pazu2k@gmail.com>2008-12-22 20:24:27 +0000
committerCa-Phun Ung <pazu2k@gmail.com>2008-12-22 20:24:27 +0000
commit0339770320d2a662652652844afea6bc8213378e (patch)
treecc781a4f207d3f50e7472da8a864a07f0603d32e /ui
parent2f436836e7377aa7aa5c77ab85880613f8ac3d5b (diff)
downloadjquery-ui-0339770320d2a662652652844afea6bc8213378e.tar.gz
jquery-ui-0339770320d2a662652652844afea6bc8213378e.zip
Datepicker #3647: Added RTL support to the datepicker theme and reverted markup changes for RTL in r1196 for better semantics.
Diffstat (limited to 'ui')
-rw-r--r--ui/ui.datepicker.js11
1 files changed, 5 insertions, 6 deletions
diff --git a/ui/ui.datepicker.js b/ui/ui.datepicker.js
index 026236093..1a64b0b5c 100644
--- a/ui/ui.datepicker.js
+++ b/ui/ui.datepicker.js
@@ -1343,8 +1343,8 @@ $.extend(Datepicker.prototype, {
var thead = '';
for (var dow = 0; dow < 7; dow++) { // days of the week
var day = (dow + firstDay) % 7;
- thead = (isRTL ? '' : thead) + '<th' + ((dow + firstDay + 6) % 7 >= 5 ? ' class="ui-datepicker-week-end"' : '') + '>' +
- '<span title="' + dayNames[day] + '">' + dayNamesMin[day] + '</span></th>' + (isRTL ? thead : '');
+ thead += '<th' + ((dow + firstDay + 6) % 7 >= 5 ? ' class="ui-datepicker-week-end"' : '') + '>' +
+ '<span title="' + dayNames[day] + '">' + dayNamesMin[day] + '</span></th>';
}
calender += thead + '</tr></thead><tbody>';
var daysInMonth = this._getDaysInMonth(drawYear, drawMonth);
@@ -1362,7 +1362,7 @@ $.extend(Datepicker.prototype, {
var otherMonth = (printDate.getMonth() != drawMonth);
var unselectable = otherMonth || !daySettings[0] ||
(minDate && printDate < minDate) || (maxDate && printDate > maxDate);
- tbody = (isRTL ? '' : tbody) + '<td class="' +
+ tbody += '<td class="' +
((dow + firstDay + 6) % 7 >= 5 ? ' ui-datepicker-week-end' : '') + // highlight weekends
(otherMonth ? ' ui-datepicker-other-month' : '') + // highlight days from other months
((printDate.getTime() == selectedDate.getTime() && drawMonth == inst.selectedMonth && inst._keyEvent) || // user pressed key
@@ -1382,8 +1382,7 @@ $.extend(Datepicker.prototype, {
(printDate.getTime() == today.getTime() ? ' ui-state-highlight' : '') +
(printDate.getTime() >= currentDate.getTime() && printDate.getTime() <= endDate.getTime() ? // in current range
' ui-state-active' : '') + // highlight selected day
- '" href="#">' + printDate.getDate() + '</a>')) + '</td>' + // display for this month
- (isRTL ? tbody : '');
+ '" href="#">' + printDate.getDate() + '</a>')) + '</td>'; // display for this month
printDate.setDate(printDate.getDate() + 1);
printDate = this._daylightSavingAdjust(printDate);
}
@@ -1395,7 +1394,7 @@ $.extend(Datepicker.prototype, {
drawYear++;
}
calender += '</tbody></table>' + (isMultiMonth ? '</div>' : '');
- group = (isRTL ? calender + group : group + calender );
+ group += calender;
}
html += group;
}