Merge branch 'master' into time-sliders

Conflicts:
	dist/js/datepicker.min.js
This commit is contained in:
t1m0n 2016-02-12 10:42:38 +03:00
commit b2a35920e2
7 changed files with 36 additions and 9 deletions

View File

@ -19,12 +19,17 @@ $('.my-datepicker').datepicker([options])
## Change log
### v1.2.2
* fixed typo in `monthsField`
* added German language (thanks to [Ichag](https://github.com/Ichag))
### v1.2.1
* tests added
* fixed if '0' is passed to 'firstDay'
* fixed 'showOtherYears' option
* fixed 'onSelect' event, when 'range' is true
* fixed case when 'range' and 'multipleDates' both set to true
* added Chinese language (thanks to [think2011](https://github.com/think2011))
* fixed if '0' is passed to `firstDay`
* fixed `showOtherYears` option
* fixed `onSelect` event, when `range` is true
* fixed case when `range` and `multipleDates` both set to true
### v1.2.0
* add `range` feature

View File

@ -53,7 +53,7 @@ var Datepicker;
autoClose: false,
// navigation
monthsFiled: 'monthsShort',
monthsField: 'monthsShort',
prevHtml: '<svg><path d="M 17,12 l -5,5 l 5,5"></path></svg>',
nextHtml: '<svg><path d="M 14,12 l 5,5 l -5,5"></path></svg>',
navTitles: {
@ -1363,7 +1363,7 @@ var Datepicker;
}
break;
case 'month':
html = parent.loc[parent.opts.monthsFiled][d.month];
html = parent.loc[parent.opts.monthsField][d.month];
break;
case 'year':
var decade = parent.curDecade;

11
dist/js/i18n/datepicker.de.js vendored Normal file
View File

@ -0,0 +1,11 @@
Datepicker.language['de'] = {
days: ['Sonntag', 'Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag'],
daysShort: ['Son', 'Mon', 'Die', 'Mit', 'Don', 'Fre', 'Sam'],
daysMin: ['So', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa'],
months: ['Januar','Februar','März','April','Mai','Juni', 'Juli','August','September','Oktober','November','Dezember'],
monthsShort: ['Jan', 'Feb', 'Mär', 'Apr', 'Mai', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dez'],
today: 'Heute',
clear: 'Aufräumen',
dateFormat: 'dd.mm.yyyy',
firstDay: 1
};

View File

@ -82,7 +82,7 @@
}
break;
case 'month':
html = parent.loc[parent.opts.monthsFiled][d.month];
html = parent.loc[parent.opts.monthsField][d.month];
break;
case 'year':
var decade = parent.curDecade;

View File

@ -53,7 +53,7 @@ var Datepicker;
autoClose: false,
// navigation
monthsFiled: 'monthsShort',
monthsField: 'monthsShort',
prevHtml: '<svg><path d="M 17,12 l -5,5 l 5,5"></path></svg>',
nextHtml: '<svg><path d="M 14,12 l 5,5 l -5,5"></path></svg>',
navTitles: {

View File

@ -0,0 +1,11 @@
Datepicker.language['de'] = {
days: ['Sonntag', 'Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag'],
daysShort: ['Son', 'Mon', 'Die', 'Mit', 'Don', 'Fre', 'Sam'],
daysMin: ['So', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa'],
months: ['Januar','Februar','März','April','Mai','Juni', 'Juli','August','September','Oktober','November','Dezember'],
monthsShort: ['Jan', 'Feb', 'Mär', 'Apr', 'Mai', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dez'],
today: 'Heute',
clear: 'Aufräumen',
dateFormat: 'dd.mm.yyyy',
firstDay: 1
};

View File

@ -742,7 +742,7 @@ describe('Options', function () {
describe('monthsField', function () {
it('defines which field from localization must be used as source for months name in "months view"', function () {
dp = $input.datepicker({
monthsFiled: 'months',
monthsField: 'months',
view: 'months'
}).data('datepicker');