|
|
|
Parameters of calendarDatePicker.handlers function
|
|
calendarDatePicker.handlers( ['txt','txt', {type : 'datetime'}] );
'txt' - id of object that is to be clicked at in order to open javascript set date,
'txt' - id of object in which value will be passed back. You can specify your own function here.
For example:
calendarDatePicker.handlers( ['txt', function(par){alert(date);}, {type : 'datetime'}] ); .
{type : 'datetime'} - type of a calendar.
Available values:
datetime - extract the date and time components
date - extract the date component only
|
Set a language
|
|
Actually language is set automatically according to your browser's settings. But you can set your own language also. Open .js file of your skin (for example: vista-gadgets/jac_skin_vistagadget.js) in any text editor:
calendarDatePicker.handlers( ['txt','txt', {type : 'datetime', locale:'de'}] );
var jac_lng = {
en : {
core_short_days_of_week : ['S', 'M', 'T', 'W', 'T', 'F', 'S']
},
de : {
core_days_offset : 0,
core_days_of_week : ['Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Sonnabend', 'Sonntag'],
core_short_days_of_week : ['M', 'D', 'M', 'D', 'F', 'S', 'S'],
core_months_of_year : ['Januar', 'Februar', 'Marz', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember']
}
};
Available values:
core_days_offset - using this parameter you can set the first day of the week. (-1: Sunday; 0: Monday).
core_days_of_week - days of the week.
core_short_days_of_week - the short names of days of the week.
core_months_of_year - months of the year.
|
Multiple popular date formats are supported (mm/dd/yyyy, dd-mm-yyyy, yyyy-mm-dd)
|
|
You can set different date formats in Calendar Date Picker.
For example:
calendarDatePicker.handlers( ['txt', 'txt', {type : 'datetime', format: '%L %d, %Y, %H:%M'}] );
The result will be: February 07, 2009, 17:15
calendarDatePicker.handlers( ['txt', 'txt', {type : 'date', format: '%d-%m-%Y'}] );
The result will be: 12-02-2009
The following conversion specifiers are recognized in the format string:
%a |
abbreviated weekday name according |
%A |
full weekday name according |
%b |
abbreviated month name according |
%B |
full month name according |
%d |
day of the month as a decimal number (range 01 to 31) |
%D |
same as %m/%d/%y |
%e |
day of the month as a decimal number, a single digit is preceded by a space (range ' 1' to '31').
This has the same format and value as %Y, except that if the ISO week number belongs to the previous or next year, that year is used instead. |
%h |
same as %b |
%H |
hour as a decimal number using a 24-hour clock (range 00 to 23) |
%I |
hour as a decimal number using a 12-hour clock (range 01 to 12) |
%j |
day of the year as a decimal number (range 001 to 366) |
%k |
similar %a, but with current language (not specification) |
%K |
similar %A, but with current language (not specification) |
%l |
similar %b, but with current language (not specification) |
%L |
similar %B, but with current language (not specification) |
%m |
month as a decimal number (range 01 to 12) |
%M |
minute as a decimal number |
%p |
either `am' or `pm' according to the given time value, or the corresponding strings |
%r |
time in a.m. and p.m. notation |
%S |
second as a decimal number |
%T |
current time, equal to %H:%M:%S |
%u |
weekday as a decimal number [1,7], with 1 representing Monday |
%U |
week number of the current year as a decimal number, starting with the first Sunday as the first day of the first week |
%V |
The ISO 8601:1988 week number of the current year as a decimal number, range 01 to 53, where week 1 is the first week that has at least 4 days in the current year, and with Monday as the first day of the week. |
%W |
week number of the current year as a decimal number, starting with the first Monday as the first day of the first week |
%w |
day of the week as a decimal, Sunday being 0 |
%y |
year as a decimal number without a century (range 00 to 99) |
%Y |
year as a decimal number including the century |
%% |
a literal `%' character |
|
What's New in Javascript Popup Calendar Control |
Calendar in Java Script Installation Info
Javascript Popup Date Picker Supported Browsers |
Javascript Set Date Parameters
|