mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Datepicker: Use Globalize 1.0.0
- Fix Use narrow day names (e.g., "ﺥ" EEEEE) if short (e.g., "ﺎﻠﺨﻤﻴﺳ" EEE) if too lengthy;
This commit is contained in:
parent
a16a788943
commit
846852a250
12
external/date.js
vendored
12
external/date.js
vendored
@ -137,12 +137,16 @@ $.date.prototype = {
|
|||||||
return new Date( year, 1, 29 ).getMonth() == 1;
|
return new Date( year, 1, 29 ).getMonth() == 1;
|
||||||
},
|
},
|
||||||
weekdays: function() {
|
weekdays: function() {
|
||||||
var result = [];
|
var cldr = Globalize.locale(),
|
||||||
|
result = [];
|
||||||
for ( var dow = 0; dow < 7; dow++ ) {
|
for ( var dow = 0; dow < 7; dow++ ) {
|
||||||
var day = ( dow + weekdaysRev[ Globalize.locale().supplemental.weekData.firstDay() ] ) % 7;
|
var day = ( dow + weekdaysRev[ cldr.supplemental.weekData.firstDay() ] ) % 7;
|
||||||
result.push({
|
result.push({
|
||||||
shortname: Globalize.locale().main([ "dates/calendars/gregorian/days/format/short", weekdays[ day ] ]),
|
shortname:
|
||||||
fullname: Globalize.locale().main([ "dates/calendars/gregorian/days/format/wide", weekdays[ day ] ])
|
cldr.main([ "dates/calendars/gregorian/days/format/short", weekdays[ day ] ]).length > 3 ?
|
||||||
|
cldr.main([ "dates/calendars/gregorian/days/format/narrow", weekdays[ day ] ]) :
|
||||||
|
cldr.main([ "dates/calendars/gregorian/days/format/short", weekdays[ day ] ]),
|
||||||
|
fullname: cldr.main([ "dates/calendars/gregorian/days/format/wide", weekdays[ day ] ])
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
Loading…
Reference in New Issue
Block a user