I am trying to set up YUI calendar.
Problem: Since end users are in different time zones, when they are selecting today's date they see different dates depending on their timezones.
Following is my code
<html>
<head>
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.9.0/build/fonts/fonts-min.css" />
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.9.0/build/calendar/assets/skins/sam/calendar.css" />
<script type="text/javascript" src="http://yui.yahooapis.com/2.9.0/build/yahoo-dom-event/yahoo-dom-event.js"></script>
<script type="text/javascript" src="http://yui.yahooapis.com/2.9.0/build/calendar/calendar-min.js"></script>
</head>
<body class="yui-skin-sam">
<div class="exampleIntro">
</div>
<div id="cal1Container"></div>
<div style="clear:both" ></div>
<!--END SOURCE CODE FOR EXAMPLE =============================== -->
<script type="text/javascript">
YAHOO.namespace("example.calendar");
YAHOO.example.calendar.init = function() {
YAHOO.example.calendar.cal1 = new YAHOO.widget.Calendar("cal1","cal1Container");
YAHOO.example.calendar.cal1.render();
}
YAHOO.util.Event.onDOMReady(YAHOO.example.calendar.init);
</script>
</body>
</html>
I am not finding configuration parameter where I can set timezone for the calendar.
I don't think YUI Calendar supports timezones. JavaScript itself doesn't support timezones. Whenever I have this problem, I avoid the Date class, send the date as a string to the server, and deal with the timezones on the server.