This time I will share jQuery Plugin and tutorial about Basic Lightweight jQuery Calendar Plugin – Yacal, hope it will help you in programming stack.
Yacal is a small and simple-to-use jQuery plugin used to embed a nice-looking calendar component with basic functionality in your webpage.
Basic usage:
1. Make you you have jQuery library installed and then include the jQuery yacal plugin’s JS and CSS files in your document.
1 |
< link rel = "stylesheet" href = "dist/jquery.yacal.css" > |
3 |
< script src = "jquery.min.js" ></ script > |
4 |
< script src = "dist/jquery.yacal.min.js" ></ script > |
2. Create a container for the calendar and use data-attributes
to config the options.
4 |
data-min-date="2014/6/15" |
5 |
data-max-date="2016/6/15"> |
3. You can also generate a calendar within a specified container using JavaScript.
1 |
$( '#container' ).yacal({ |
4. Full plugin options.
25 |
day: tag( 'a' , 'day d' + _ph.dw + '' + _ph.we + '' + _ph.t + '' + _ph.s + '' + _ph.a, _ph.d, 'time="' + _ph.dt + '"' ), |
26 |
weekday: tag( 'i' , 'wday wd' + _ph.wd, _ph.wdn), |
27 |
week: tag( 'div' , 'week w' + _ph.w + _ph.ws, '|' , 'time="' + _ph.wt + '"' ), |
28 |
month: tag( 'div' , 'month m' + _ph.m, tag( 'h4' , null , _ph.mnam + ' ' + _ph.y) + '|' ), |
29 |
nav: tag( 'div' , 'yclNav' , tag( 'a' , 'prev' , tag( 'span' , null , _ph.prev)) + tag( 'a' , 'next' , tag( 'span' , null , _ph.next))), |
30 |
wrap: tag( 'div' , 'wrap' ), |
31 |
clearfix: tag( 'div' , 'clearfix' ) |
36 |
weekdays: [ 'Su' , 'Mo' , 'Tu' , 'We' , 'Th' , 'Fr' , 'Sa' ], |
37 |
months: [ 'Jan' , 'Feb' , 'Mar' , 'Apr' , 'May' , 'Jun' , 'Jul' , 'Aug' , 'Sep' , 'Oct' , 'Nov' , 'Dec' ], |
Change log:
v0.5.0 (2015-09-17)
v0.3.2 (2015-07-30)
- Improves timestamp read (with +date).
This awesome jQuery plugin is developed by eduludi. For more Advanced Usages, please check the demo page or visit the official website.