My favorites | Sign in
Project Home Downloads Wiki Issues Source
Project Information
Members
Links

YUICalendar allows a developer to create a YUI calendar simply by specifying a class name to an input field in a form.

The helper script requires the YUI framework and must include the calendar scripts from YUI prior to use.

NOTE: Project is currently in import phase and code should not be used in a production environment.

Usage

Include the YUI library scripts - yahoo, dom, event and calendar. Include the YUI library css - calendar Include the YUICalendar.js script At this point the application is ready now all that is required is to create your form. Out of the box the YUICalendar script is configured to handle basic calendars using the class name "basicCalendar". To create a calendar simply define a form input field and give it the class name "basicCalendar" and your calendar will be created for you.

Code Example

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script src="http://yui.yahooapis.com/2.7.0/build/yuiloader/yuiloader-min.js"></script> 
<script language="javascript1.5">
	var loader = new YAHOO.util.YUILoader({    
					require: ["get","dom","event","calendar","fonts","base"],    
					loadOptional: true,    
					onSuccess: function() {      
						var objTransaction = YAHOO.util.Get.script("http://www.YUICODER.COM/scripts/YUICalendar.js");
				//Yevent.onDOMReady(init);    
				},    
				timeout: 10000,    
				combine: true});loader.insert();
</script>
</head>

<body class="yui-skin-sam">
<form>
  <p>
    <input type=text name="input" class="basicCalendar">
  </p>

</form>
</body>
</html>
Powered by Google Project Hosting