Skip to main content

Search and Top Navigation

#6828 closed enhancement (fixed)

Opened January 11, 2011 09:35AM UTC

Closed January 17, 2011 02:28PM UTC

Last modified January 17, 2011 02:37PM UTC

Datepicker: Add en-AU or en-NZ initialisations

Reported by: cim Owned by:
Priority: minor Milestone: 1.8.9
Component: ui.datepicker Version: 1.8.7
Keywords: Cc:
Blocked by: Blocking:
Description

There are no en-AU or en-NZ initialisations for datepicker. Although they are the same as en-GB, it makes it difficult to write applications that set the datepicker initialisation based on the browser's language preference order. I'd therefore like to see the two initialisations below added to jquery-ui-i18n.js (or alternatively, to save space, some mechanism for having a number of initialisations which are identical).

/* English/Australia initialisation for the jQuery UI date picker plugin. */
/* Based on the en-GB initialisation. */
jQuery(function($){
	$.datepicker.regional['en-AU'] = {
		closeText: 'Done',
		prevText: 'Prev',
		nextText: 'Next',
		currentText: 'Today',
		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'],
		dayNamesMin: ['Su','Mo','Tu','We','Th','Fr','Sa'],
		weekHeader: 'Wk',
		dateFormat: 'dd/mm/yy',
		firstDay: 1,
		isRTL: false,
		showMonthAfterYear: false,
		yearSuffix: ''};
	$.datepicker.setDefaults($.datepicker.regional['en-AU']);
});
/* English/New Zealand initialisation for the jQuery UI date picker plugin. */
/* Based on the en-GB initialisation. */
jQuery(function($){
	$.datepicker.regional['en-NZ'] = {
		closeText: 'Done',
		prevText: 'Prev',
		nextText: 'Next',
		currentText: 'Today',
		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'],
		dayNamesMin: ['Su','Mo','Tu','We','Th','Fr','Sa'],
		weekHeader: 'Wk',
		dateFormat: 'dd/mm/yy',
		firstDay: 1,
		isRTL: false,
		showMonthAfterYear: false,
		yearSuffix: ''};
	$.datepicker.setDefaults($.datepicker.regional['en-NZ']);
});

Thanks,

Campbell

Attachments (0)
Change History (4)

Changed January 11, 2011 09:36AM UTC by cim comment:1

See also ticket #6682

Changed January 17, 2011 02:27PM UTC by scottgonzalez comment:2

status: newopen
summary: No en-AU or en-NZ initialisations for datepickerDatepicker: Add en-AU or en-NZ initialisations

Changed January 17, 2011 02:28PM UTC by Scott González comment:3

resolution: → fixed
status: openclosed

Datepicker i18n: Added Australian and New Zealand localizations. Fixes #6828 - Datepicker: Add en-AU or en-NZ initialisations.

Thanks Campbell

Changeset: a4d2a0fa192befd99f15d2ee80668ece89c1ef5f

Changed January 17, 2011 02:37PM UTC by scottgonzalez comment:4

milestone: 1.91.8.9

Fixed in 1-8-stable in b3145fb5bcfe6e8f283cb92cb368d094568e02ff.