您的位置:首页 > Web前端 > JQuery

jQuery时间控件说明文档

2011-04-25 09:54 344 查看

OptionsDate format syntax

KeyDefault valueDescription
displayArea""Relative jQuery traverse method(s); find first matched element and show the date in it. eg ".siblings('div.dispArea')"
button""Relative jQuery traverse method(s); find first matched element and bind show/hide event for calendar. eg ".siblings('button')"
flat""(String) relative jQuery traverse method(s); find first matched element (Should be a block element) and place the flat calendar within. eg ".parent().siblings('div.flatCal')"
eventName"click"event that will trigger the calendar popup, no "on" prefix
ifFormat"%Y/%m/%d"date format that will be stored in the input field
daFormat"%Y/%m/%d"the date format that will be used to display the date in displayArea
singleClicktrueIs the calendar is in single click mode?
dateStatusFuncnullfunction that receives a JS Date object and should return true if that date has to be disabled in the calendar, or String for CSS classes.
dateTextnullFunction to translated date to text
firstDaynullnumeric: 0 to 6. "0" means display Sunday first, "1" means display Monday first, etc. Defaults to language setting.
align"Br"alignment; See below
range2999array with 2 elements; the range of years available
weekNumberstrueDisplay week numbers?
flatCallbacknullfunction that receives a JS Date object and returns an URL to point the browser to (for flat calendar)
onSelectnullfunction that gets called when a date is selected. You don't have to supply this (the default is generally okay)
onClosenullfunction that gets called when the calendar is closed.
onUpdatenullfunction that gets called after the date is updated in the input field. Receives a reference to the calendar.
datenullthe date that the calendar will be initially displayed to
showsTimefalseShould calendar include a time selector?
timeFormat"24"the time format; can be "12" or "24"
electrictrueif true then given fields/date areas are updated for each move; otherwise they're updated only on close
step2configures the step of the years in drop-down boxes.
positionnullconfigures the calendar absolute position; default: null
cachefalseReuse the same calendar object, where possible ?
showOthersfalseShow days from other months too ?
multiplenull,Allow multiple dates - TODO
debugfalseWrite debug info to firebug console
SymbolMeaning
%aabbreviated weekday name
%Afull weekday name
%babbreviated month name
%Bfull month name
%Ccentury number
%dthe day of the month ( 00 .. 31 )
%ethe day of the month ( 0 .. 31 )
%Hhour ( 00 .. 23 )
%Ihour ( 01 .. 12 )
%jday of the year ( 000 .. 366 )
%khour ( 0 .. 23 )
%lhour ( 1 .. 12 )
%mmonth ( 01 .. 12 )
%Mminute ( 00 .. 59 )
%na newline character
%p`PM'' or `AM''
%P`pm'' or `am''
%Ssecond ( 00 .. 59 )
%snumber of seconds since Epoch (since Jan 01 1970 00:00:00 UTC)
%ta tab character
%U, %W, %Vthe week number
%uthe day of the week ( 1 .. 7, 1 = MON )
%wthe day of the week ( 0 .. 6, 0 = SUN )
%yyear without the century ( 00 .. 99 )
%Yyear including the century ( ex. 1979 )
%%a literal % character
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: