精美的js日期控件,可以多个参数设定。

时间:2014-01-13 04:45:29
【文件属性】:

文件名称:精美的js日期控件,可以多个参数设定。

文件大小:174KB

文件格式:ZIP

更新时间:2014-01-13 04:45:29

精美 js 日期控件

Properties Following the first object, the class also accepts an optional second object that may contain any of the following properties to help customize Calendar to your website: * blocked - An array of blocked (disabled) dates in the following format: 'day month year'. The syntax is similar to cron: the values are separated by spaces and may contain * (asterisk) - (dash) and , (comma) delimiters. For example blocked: ['1 1 2007'] would disable January 1, 2007; blocked: ['* 1 2007'] would disable all days (wildcard) in January, 2007; blocked: ['1-10 1 2007'] would disable January 1 through 10, 2007; while blocked: ['1,10 1 2007'] would disable January 1 and 10, 2007. In combination: blocked: ['1-10,20,22,24 1-3 *'] would disable 1 through 10, plus the 22nd and 24th of January through March for every (wildcard) year. There is an optional additional value which is day of the week (0 - 6 with 0 being Sunday). For example blocked: ['0 * 2007 0,6'] would disable all weekends (saturdays and sundays) in 2007. * classes - An array of 12 CSS classes that are applied to the calendar construct: calendar, prev, next, month, year, today, invalid, valid, inactive, active, hover, hilite. It is not necessary (as of RC3) to pass all 11 classes in the array: if you only wanted to change the 1st class you would set classes: ['alternate']; if you only wanted to change the 1st and 4th classes you would need to set classes: ['alternate', '', '', 'mes']. The first class, by default 'calendar', is applied to the div that contains the calendar element, the calendar button and the input or select it is appended to. The 'hilite' class (as of RC4) is applied to all days between 2 or more selected dates in multi-calendar functionality - see the demo for an example. * days - An array of the 7 names of the days of the week, starting with sunday. * direction - A positive or negative integer that determines the calendar's direction: n (a positive number) the calendar is future-only beginning at n days after today; -n (a negative number) the calendar is past-only ending at n days before today; 0 (zero) the calendar has no future or past restrictions (default). Note if you would like the calendar to be directional starting from today–as opposed to (1) tomorrow or (-1) yesterday–use a positive or negative fraction, such as direction: .5 (future-only, starting today). * draggable - A boolean value, true or false, to indicate if the calendar element will be draggable–useful in case the calendar obstructs (or is obstructed by) some other element on the page. Note, requires Mootools to be compiled with the Drag component. * months - An array of the 12 names of the month, starting with january. * navigation - An integer–0, 1 or 2–indicating which navigation method the class will use: traditional navigation (1) where left and right arrows allow the user to navigate by month (default); improved navigation (2) where the user can navigate by month or year; and static navigation (0) which is actually no navigation at all. * offset - An integer that indicates the first day of the week, with 0 being Sunday (default). * onHideStart, onHideComplete, onShowStart, onShowComplete - Event handlers that can be used to trigger your own scripts. * pad - An integer, the minimum number of days between calendars with multi-calendar functionality. For example: 1 (default) would enforce multiple calendars to space at least 1 day between picked dates; 7 would enforce a space of at least 1 week; while 0 (no padding) would allow multiple calendars to occupy the same date. * tweak - An object with { x: 0, y: 0} values that will "tweak" the calendar's placement on the page by x number of pixels horizontally and y number of pixels vertically. //参数说明 //日期格式字符(d, D, j, l, N, w, S, F, m, M, n, Y, y)分别对应(01, Mon, 01, Mon, 2, 2, st, 2月, 02, 2月, 02, 2010, 10) //blocked:禁止选择的日期。blocked: ['日 月 年 周(可选)'],blocked: ['3 * *']:表示禁止选择所有年份的所有月份的3号,blocked: ['1-10 3 2010']:表示禁止选择2010年3月1日到10日的日期,blocked: ['1,10 3 2010']:表示禁止选择2010年3月的1日和10日,blocked: ['1-10,20,22,24 1-3 *']:表示禁止所有所份的1到3月份的1到10日,20日,22日,24日的日期,blocked: ['0 * 2010 0,6']:表示禁止选择2010年所有月份的周六和周日 //classes:3种风格样式,calendar,dashboard,i-heart-ny,默认为calendar //days:定义星期显示的文字,默认为英文。days: ['日','一','二','三','四','五','六'] //direction:可选择日期的方向。0:表示不限制,负数:表示只可选当前日期的前负数值天的日期,正数表示只可选当前日期的前(正数值-1)天的日期 //draggable:是否可拖动,值为true和false,默认为true //months:定义月份显示的文字,默认为英文。months:['1月','2月','3月','4月','5月','6月','7月','8月','9月','10月','11月','12月'] //navigation:年月的导航。0:表示没有导航,1:有月导航按钮(默认值),2:有年月导航按钮 //offset:指示一周的第一天是星期几,默认为0,指星期天 //onHideStart, onHideComplete, onShowStart, onShowComplete:事件,可用于触发您自己的脚本处理程序 //pad:多日历显示,参考官网:http://www.electricprism.com/aeron/calendar/ //tweak:日历控件的相对座标


【文件预览】:
css
----i-heart-ny-prev.png(1KB)
----calendar-next.gif(374B)
----i-heart-ny-mar.jpg(11KB)
----calendar.png(1KB)
----calendar-valid.gif(504B)
----calendar-icon.gif(625B)
----i-heart-ny-invalid.gif(494B)
----i-heart-ny.png(18KB)
----i-heart-ny-nov.jpg(13KB)
----i-heart-ny-inactive.gif(378B)
----i-heart-ny.css(4KB)
----i-heart-ny-jul.jpg(9KB)
----dashboard-next.gif(188B)
----calendar-td.gif(498B)
----i-heart-ny-aug.jpg(5KB)
----i-heart-ny-dec.jpg(6KB)
----dashboard-icon.gif(406B)
----i-heart-ny-oct.jpg(9KB)
----calendar-prev.gif(376B)
----i-heart-ny-jan.jpg(13KB)
----iframe.css(2KB)
----dashboard.png(2KB)
----calendar-hilite.gif(242B)
----i-heart-ny-next.png(1KB)
----i-heart-ny-feb.jpg(6KB)
----i-heart-ny-sep.jpg(9KB)
----dashboard.css(2KB)
----i-heart-ny-icon.gif(546B)
----i-heart-ny-jun.jpg(12KB)
----i-heart-ny-active.gif(380B)
----calendar.css(3KB)
----i-heart-ny-apr.jpg(9KB)
----dashboard-prev.gif(188B)
----i-heart-ny-may.jpg(8KB)
属性说明.txt
js
----mootools.js(42KB)
----calendar.rc4.js(33KB)
----calendar.js(15KB)
index.htm

网友评论

  • 妹研究明白怎么设置日期可选状态
  • 挺不错的 很实用 辛苦了
  • 挺不错的 很实用 辛苦了
  • 控件可以实现,但不是我要的效果,页面布局也一般
  • 控件不错,挺实用
  • 挺不错的,谢谢分享
  • 很不错,按日和月都可以进行合理确实很不错,按日和月都可以进行合理操作。自己稍微修改了一下css控件不错,挺实用 .
  • 很不错,按日和月都可以进行合理
  • 确实很不错,按日和月都可以进行合理操作。自己稍微修改了一下css
  • 控件不错,挺实用