Created
March 27, 2012 11:17
-
-
Save Mikke/2215048 to your computer and use it in GitHub Desktop.
calendarFail
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<style type="text/css"> | |
@import "/custom/dojo/resources/dojo.css"; | |
@import "/custom/dijit/themes/tundra/tundra.css"; | |
@import "/custom/dijit/themes/dijit.css"; | |
@import "/custom/dojox/widget/Calendar/Calendar.css"; | |
.title { | |
font-weight: bolder; | |
} | |
</style> | |
<title>Calendar page</title> | |
<link href="/myfirstdojowidget/style.css" media="screen" rel="stylesheet" type="text/css" /> | |
<!-- Configure Dojo --> | |
<script> | |
// We're specifying our Dojo Configuration this way, | |
// as it's a bit more complex and easier to type out | |
// than a data-dojo-config string | |
var dojoConfig = (function(){ | |
var base = location.href.split("/"); | |
base.pop(); | |
base = base.join("/"); | |
return { | |
async: false, | |
isDebug: true, | |
packages: [{ | |
name: "custom", | |
location: base + "/custom" | |
}] | |
}; | |
})(); | |
</script> | |
<!-- Load up Dojo --> | |
<script src="/custom/dojo/dojo.js"></script> | |
<script src="/custom/dijit/dijit.js"></script> | |
<script> | |
dojo.require("dijit.dijit"); // loads the optimized dijit layer | |
dojo.require("dijit.Calendar"); | |
</script> | |
</head> | |
<body> | |
<h1>Calendar Example</h1> | |
<div data-dojo-type="dijit.Calendar" data-dojo-props="onChange:function(){dojo.byId('formatted').innerHTML=dojo.date.locale.format(arguments[0], {formatLength: 'full', selector:'date'})}"></div> | |
<p id="formatted"></p> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment