Although calender is displaying properly, when I comment mycal.hide().
But it is not working on button click.
<!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>YUI Calender</title>
<link rel="stylesheet" type="text/css" href="build/calendar/assets/skins/sam/calendar-skin.css" />
<script type="text/javascript" src="build/yahoo-dom-event/yahoo-dom-event.js"></script>
<script type="text/javascript" src="build/calendar/calendar-min.js"></script>
<script type="text/javascript">
YAHOO.namespace("yuibook.calendar");
YAHOO.yuibook.calendar.launchCal = function() {
var mycal=new YAHOO.widget.Calendar("mycal","calcont");
mycal.render();
mycal.hide();
var show = function() {
mycal.render();
};
}
YAHOO.util.Event.onDOMReady(YAHOO.yuibook.calendar.launchCal);
YAHOO.util.Event.addListener("clickme", "click", YAHOO.yuibook.calendar.launchCal.show, YAHOO.yuibook.calendar.launchCal, true);
/*
function show()
{
YAHOO.yuibook.calendar.launchCal.mycal.render();
}
YAHOO.yuibook.calendar.cal2=new new YAHOO.widget.Calendar("cal2","calcont", { title:"Choose a date:", close:true } );
YAHOO.example.calendar.cal2.render();
YAHOO.util.Event.addListener("clickme", "click",YAHOO.yuibook.calendar.cal2.show, YAHOO.yuibook.calendar.cal2, true);
*/
</script>
</head>
<body>
<div id="sec1">
<input type="button" id="clickme" value="clickit"/>
</div>
<div id="calcont">
</div>
</body>
</html>