translate js calendar
This commit is contained in:
@@ -174,7 +174,8 @@
|
||||
"monthNames": ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
|
||||
"monthNamesShort": ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
|
||||
"dayNames": ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
|
||||
"dayNamesShort": ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]
|
||||
"dayNamesShort": ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
||||
"dayNamesMin": ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"]
|
||||
},
|
||||
"options": {
|
||||
"salutationName": {
|
||||
|
||||
@@ -86,7 +86,29 @@ Espo.define('Views.Fields.Date', 'Views.Fields.Base', function (Dep) {
|
||||
weekStart: this.getDateTime().weekStart,
|
||||
autoclose: true,
|
||||
todayHighlight: true,
|
||||
};
|
||||
};
|
||||
|
||||
var language = this.getSettings().get('language');
|
||||
|
||||
if (!(language in $.fn.datepicker.dates)) {
|
||||
$.fn.datepicker.dates[language] = {
|
||||
days: this.translate('dayNames', 'lists'),
|
||||
daysShort: this.translate('dayNamesShort', 'lists'),
|
||||
daysMin: this.translate('dayNamesMin', 'lists'),
|
||||
months: this.translate('monthNames', 'lists'),
|
||||
monthsShort: this.translate('monthNamesShort', 'lists'),
|
||||
today: this.translate('Today'),
|
||||
clear: this.translate('Clear'),
|
||||
};
|
||||
}
|
||||
|
||||
var options = {
|
||||
format: this.getDateTime().dateFormat.toLowerCase(),
|
||||
weekStart: this.getDateTime().weekStart,
|
||||
autoclose: true,
|
||||
todayHighlight: true,
|
||||
language: language
|
||||
};
|
||||
|
||||
this.$element.datepicker(options);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user