Calendar provides configuration properties that can be used to change the Calendar's various data labels, when the Calendar is used in different locales. This example shows how to provide locale specific labels for month and weekday names, as well as how to configure the expected format of any date strings passed in to the Calendar. It uses Germany as an example locale
There are several properties that are used to change localization settings:
In addition, the Calendar provides special configuration properties for determining how incoming dates and date ranges should be formatted. By default, the date format for input to the Calendar is mm/dd/yyyy. Ranges are separated by a dash ("-") and lists of dates are delimited using a comma (","). Using these properties, the initial formatting of date can be easily modified:
In our tutorial, we will create a German Calendar that is set up both to accept dates in the standard German format (dd.mm.yyyy) and present the labels in German. Note that all of our date label values will contain special characters in Unicode notation. Also, we will present the weekday labels in the "short" format, which will amount to 2 characters in this example.
Next, we can set some selected dates and the current pagedate using our newly configured date format, and render the Calendar:
Note: You are viewing this example in debug mode with logging enabled. This can significantly slow performance.
Copyright © 2007 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Copyright Policy - Job Openings