Wednesday, December 15, 2010

Dojo : DateTextBox

<html>
<head>
  <title>Dojo: Hello World!</title>

  <!-- SECTION 1 -->
  <style type="text/css">
      @import "js/dijit/themes/tundra/tundra.css";
      @import "js/dojo/resources/dojo.css"
  </style>
  <script type="text/javascript" src="js/dojo/dojo.js"
    djConfig="parseOnLoad: true"></script>
</head>

<body class="tundra">
  <script type="text/javascript">
     // Load Dojo's code relating to the Button widget
     dojo.require("dijit.form.Button");
  dojo.require("dijit.form.DateTextBox");
  </script>

  <button dojoType="dijit.form.Button" id="helloButton">
      Hello World!
      <script type="dojo/method" event="onClick">
         alert('You pressed the button');
      </script>
  </button>
<input id="q14b" type="text" name="date1" value="2005-12-30"
    dojoType="dijit.form.DateTextBox"
    lang="en-us"
    required="true"
    promptMessage="mm/dd/yyyy"
    invalidMessage="Invalid date. Use mm/dd/yyyy format." />
</body>
</html>

No comments:

Post a Comment