Building on the Quick Start example, you can set the showTrigger option to true, and without providing comboItems, you create a drop-down calendar.
- In the <head> section of your HTML file, replace the script that includes the document ready function with this one, which sets the showTrigger option to true and leaves all other options on their default settings.
Drop down and copy script to paste in <head> section
Script |
Copy Code
|
<script type="text/javascript">
requirejs.config({
baseUrl: "http://cdn.wijmo.com/amd-js/",
paths: {
"jquery": "jquery-1.9.1.min",
"jquery-ui": "jquery-ui-1.10.1.custom.min",
"jquery.ui": "jquery-ui",
"jquery.mousewheel": "jquery.mousewheel.min",
"globalize": "globalize.min",
"bootstrap": "bootstrap.min", //Needed if you use Bootstrap.
"knockout": "knockout-2.2.0" //Needed if you use Knockout.
}
});
</script>
<script id="scriptInit" type="text/javascript">
require(["wijmo.wijinputdate", "wijmo.data.ajax"], function () {
$(document).ready(function () {
$("#textbox1").wijinputdate(
{
showTrigger: true
});
});
});
</script> |
- No changes are necessary in the <body> section of your HTML file. The basic <div> tag is sufficient to create the widget.
- Save your HTML file and open it in a browser. The widget appears like the one in the live widget below. Click the arrow button (trigger) to drop down the calendar.
See Also
Widgets
Reference