aboutsummaryrefslogtreecommitdiffstats
path: root/js/field.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/field.js')
-rw-r--r--js/field.js12
1 files changed, 10 insertions, 2 deletions
diff --git a/js/field.js b/js/field.js
index 0824e2714..4150f8ce4 100644
--- a/js/field.js
+++ b/js/field.js
@@ -83,9 +83,17 @@ function _errorFor(field, name) {
YAHOO.util.Dom.addClass(field, 'validation_error_field');
}
-function createCalendar(name) {
+/* This function is never to be called directly, but only indirectly
+ * using template/en/default/global/calendar.js.tmpl, so that localization
+ * works. For the same reason, if you modify this function's parameter list,
+ * you need to modify the documentation in said template as well. */
+function createCalendar(name, start_weekday, months_long, weekdays_short) {
var cal = new YAHOO.widget.Calendar('calendar_' + name,
- 'con_calendar_' + name);
+ 'con_calendar_' + name,
+ { START_WEEKDAY: start_weekday,
+ MONTHS_LONG: months_long,
+ WEEKDAYS_SHORT: weekdays_short
+ });
YAHOO.bugzilla['calendar_' + name] = cal;
var field = document.getElementById(name);
cal.selectEvent.subscribe(setFieldFromCalendar, field, false);