mirror of
https://github.com/frappe/air-datepicker.git
synced 2026-01-14 11:01:22 +08:00
Merge branch 'master' into time-sliders
Conflicts: dist/js/datepicker.min.js
This commit is contained in:
commit
b2a35920e2
13
README.md
13
README.md
@ -19,12 +19,17 @@ $('.my-datepicker').datepicker([options])
|
|||||||
|
|
||||||
## Change log
|
## Change log
|
||||||
|
|
||||||
|
### v1.2.2
|
||||||
|
* fixed typo in `monthsField`
|
||||||
|
* added German language (thanks to [Ichag](https://github.com/Ichag))
|
||||||
|
|
||||||
### v1.2.1
|
### v1.2.1
|
||||||
* tests added
|
* tests added
|
||||||
* fixed if '0' is passed to 'firstDay'
|
* added Chinese language (thanks to [think2011](https://github.com/think2011))
|
||||||
* fixed 'showOtherYears' option
|
* fixed if '0' is passed to `firstDay`
|
||||||
* fixed 'onSelect' event, when 'range' is true
|
* fixed `showOtherYears` option
|
||||||
* fixed case when 'range' and 'multipleDates' both set to true
|
* fixed `onSelect` event, when `range` is true
|
||||||
|
* fixed case when `range` and `multipleDates` both set to true
|
||||||
|
|
||||||
### v1.2.0
|
### v1.2.0
|
||||||
* add `range` feature
|
* add `range` feature
|
||||||
|
|||||||
4
dist/js/datepicker.js
vendored
4
dist/js/datepicker.js
vendored
@ -53,7 +53,7 @@ var Datepicker;
|
|||||||
autoClose: false,
|
autoClose: false,
|
||||||
|
|
||||||
// navigation
|
// navigation
|
||||||
monthsFiled: 'monthsShort',
|
monthsField: 'monthsShort',
|
||||||
prevHtml: '<svg><path d="M 17,12 l -5,5 l 5,5"></path></svg>',
|
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>',
|
nextHtml: '<svg><path d="M 14,12 l 5,5 l -5,5"></path></svg>',
|
||||||
navTitles: {
|
navTitles: {
|
||||||
@ -1363,7 +1363,7 @@ var Datepicker;
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'month':
|
case 'month':
|
||||||
html = parent.loc[parent.opts.monthsFiled][d.month];
|
html = parent.loc[parent.opts.monthsField][d.month];
|
||||||
break;
|
break;
|
||||||
case 'year':
|
case 'year':
|
||||||
var decade = parent.curDecade;
|
var decade = parent.curDecade;
|
||||||
|
|||||||
11
dist/js/i18n/datepicker.de.js
vendored
Normal file
11
dist/js/i18n/datepicker.de.js
vendored
Normal 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
|
||||||
|
};
|
||||||
@ -82,7 +82,7 @@
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'month':
|
case 'month':
|
||||||
html = parent.loc[parent.opts.monthsFiled][d.month];
|
html = parent.loc[parent.opts.monthsField][d.month];
|
||||||
break;
|
break;
|
||||||
case 'year':
|
case 'year':
|
||||||
var decade = parent.curDecade;
|
var decade = parent.curDecade;
|
||||||
|
|||||||
@ -53,7 +53,7 @@ var Datepicker;
|
|||||||
autoClose: false,
|
autoClose: false,
|
||||||
|
|
||||||
// navigation
|
// navigation
|
||||||
monthsFiled: 'monthsShort',
|
monthsField: 'monthsShort',
|
||||||
prevHtml: '<svg><path d="M 17,12 l -5,5 l 5,5"></path></svg>',
|
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>',
|
nextHtml: '<svg><path d="M 14,12 l 5,5 l -5,5"></path></svg>',
|
||||||
navTitles: {
|
navTitles: {
|
||||||
|
|||||||
11
src/js/i18n/datepicker.de.js
Normal file
11
src/js/i18n/datepicker.de.js
Normal 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
|
||||||
|
};
|
||||||
@ -742,7 +742,7 @@ describe('Options', function () {
|
|||||||
describe('monthsField', function () {
|
describe('monthsField', function () {
|
||||||
it('defines which field from localization must be used as source for months name in "months view"', function () {
|
it('defines which field from localization must be used as source for months name in "months view"', function () {
|
||||||
dp = $input.datepicker({
|
dp = $input.datepicker({
|
||||||
monthsFiled: 'months',
|
monthsField: 'months',
|
||||||
view: 'months'
|
view: 'months'
|
||||||
}).data('datepicker');
|
}).data('datepicker');
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user