views:

140

answers:

1

Does the calendar get the month names from the users computer, or is this predefined in the control itself?

I.e. for the same piece of code, would it say "June" when viewing it on an English PC and the German equivalent when viewing it on a German PC?

I am not too familiar with this I must admit. I guess CalendarPopup(); is used?

+2  A: 

JavaScript does not have a native method that derives the localised names for days & months. The localised data functions native to JavaScript only return dates in the numerical formats as defined by the user's system locale conventions.

Those methods are toLocaleString, toLocaleDateString, & toLocaleTimeString.

All the other methods that do return human readable names for months, do so in American English.

JavaScript 1.6 implements a new method "toLocaleFormat" that is non-standard but would be able to provide you with the names of days & months.

Most JavaScript Date Picker widgets employs some collection of objects containing the localised names.

Raybiez