/dyndatetime/example.html

http://dyndatetime.googlecode.com/ · HTML · 100 lines · 82 code · 18 blank · 0 comment · 0 complexity · d158a3aa8dd4ce1559798ad0ca86d728 MD5 · raw file

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
  5. <title>dynDateTime: jQuery date time calendar plugin, based on Dynarch calendar </title>
  6. <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"></script>
  7. <script type="text/javascript" src="jquery.dynDateTime.js"></script>
  8. <script type="text/javascript" src="lang/calendar-en.js"></script>
  9. <link rel="stylesheet" type="text/css" media="all" href="css/calendar-win2k-cold-1.css" />
  10. </head>
  11. <body>
  12. <h1>dynDateTime</h1>
  13. <p>See project <a href="http://code.google.com/p/dyndatetime/">home page</a> for details.</p>
  14. <form action="/nothing/to/post.to">
  15. <div>
  16. <h3>Default with no options</h3>
  17. <script type="text/javascript">
  18. jQuery(document).ready(function() {
  19. jQuery("#dateDefault").dynDateTime(); //defaults
  20. });
  21. </script>
  22. <input type="text" name="dateDef" id="dateDefault"/>
  23. <hr/>
  24. <h3>Bind to multiple inputs in one go</h3>
  25. <script type="text/javascript">
  26. jQuery(document).ready(function() {
  27. jQuery("#multi input").dynDateTime({
  28. button: ".next()" //next sibling
  29. });
  30. });
  31. </script>
  32. <div id="multi">
  33. <input type="text" name="dateA"/>
  34. <button type="button">PICKER</button>
  35. <br/>
  36. <input type="text" name="dateB"/>
  37. <button type="button">PICKER</button>
  38. <br/>
  39. <input type="text" name="dateC" value="2001/09/11"/>
  40. <button type="button">PICKER</button>
  41. <br/>
  42. </div>
  43. <hr/>
  44. <h3>Using time, custom format, display output, and different pop-up location</h3>
  45. <script type="text/javascript">
  46. jQuery(document).ready(function() {
  47. jQuery("#dateTimeCustom").dynDateTime({
  48. showsTime: true,
  49. ifFormat: "%Y/%m/%d-%H:%M",
  50. daFormat: "%l;%M %p, %e %m, %Y",
  51. align: "TL",
  52. electric: false,
  53. singleClick: false,
  54. displayArea: ".siblings('.dtcDisplayArea')",
  55. button: ".next()" //next sibling
  56. });
  57. });
  58. </script>
  59. The selected date is <span class="dtcDisplayArea"></span> <br/>
  60. <input type="text" name="dateTimeCust" id="dateTimeCustom"/>
  61. <button type="button">PICKER</button>
  62. <hr/>
  63. <h3>Flat example</h3>
  64. <script type="text/javascript">
  65. jQuery(document).ready(function() {
  66. jQuery("#dateFlat").dynDateTime({
  67. flat: ".next()"
  68. });
  69. });
  70. </script>
  71. <input type="text" name="dateDef" id="dateFlat" value="2001/09/11"/>
  72. <div style="float: left;">&nbsp;</div>
  73. <hr style="clear: both;"/>
  74. </div>
  75. </form>
  76. <p>
  77. <a href="http://validator.w3.org/check?uri=referer">
  78. <img src="http://www.w3.org/Icons/valid-xhtml10-blue" alt="Valid XHTML 1.0 Strict" height="31" width="88" />
  79. </a>
  80. </p>
  81. </body>
  82. </html>