PageRenderTime 93ms CodeModel.GetById 34ms RepoModel.GetById 0ms app.codeStats 0ms

/demos/calendar/index.html

https://github.com/eromba/jquery-mobile-datebox
HTML | 121 lines | 92 code | 28 blank | 1 comment | 0 complexity | 23ad3bd0afbf2b9f7bc0c6874bd3b20b MD5 | raw file
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  5. <meta name="viewport" content="width=device-width, initial-scale=1">
  6. <title>jQueryMobile - DateBox Demos</title>
  7. <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0b2/jquery.mobile-1.0b2.min.css" />
  8. <link type="text/css" href="http://dev.jtsage.com/cdn/datebox/latest/jquery.mobile.datebox.min.css" rel="stylesheet" />
  9. <link type="text/css" href="http://dev.jtsage.com/jQM-DateBox/css/demos.css" rel="stylesheet" />
  10. <!-- NOTE: Script load order is significant! -->
  11. <script type="text/javascript" src="http://code.jquery.com/jquery-1.6.1.min.js"></script>
  12. <script type="text/javascript" src="http://code.jquery.com/mobile/1.0b2/jquery.mobile-1.0b2.min.js"></script>
  13. <script type="text/javascript" src="http://dev.jtsage.com/jquery.mousewheel.min.js"></script>
  14. <script type="text/javascript" src="http://dev.jtsage.com/cdn/datebox/latest/jquery.mobile.datebox.min.js"></script>
  15. <script type="text/javascript" src="http://dev.jtsage.com/gpretty/prettify.js"></script>
  16. <link type="text/css" href="http://dev.jtsage.com/gpretty/prettify.css" rel="stylesheet" />
  17. <script type="text/javascript">
  18. $('div').live('pagecreate', function() {
  19. prettyPrint()
  20. });
  21. </script>
  22. </head>
  23. <body>
  24. <div data-role="page" data-theme="a" id="calIndex">
  25. <div data-role="header">
  26. <h1>jQueryMobile - DateBox</h1>
  27. <a href="../../" data-icon="home" data-iconpos="notext">Home</a>
  28. </div>
  29. <div data-role="content" data-theme="c">
  30. <div class="content-secondary">
  31. <div id="jqm-homeheader">
  32. <h1 id="jqm-logo"><img src="/jQM-DateBox/demos/jquery-logo-db.png" alt="jQuery Mobile Framework :: DateBox" /></h1>
  33. <p>A Date and Time Picker plugin for jQueryMobile</p>
  34. </div>
  35. <ul data-role="listview" data-inset="true" data-theme="c" data-dividertheme="f">
  36. <li data-role="list-divider">Calendar Demos</li>
  37. <li data-theme='a'>Simple Calendars</li>
  38. <li><a href="limit.html">Range Limiting &amp; Picking</a></li>
  39. <li><a href="blackhigh.html">Disabled &amp; Highlighted Dates</a></li>
  40. </ul>
  41. </div><!--/content-primary-->
  42. <div class="content-primary">
  43. <nav>
  44. <h2>Basic Calendar</h2>
  45. <div data-role="fieldcontain">
  46. <label for="defcal">Some Date</label><input name="defcal" type="date" data-role="datebox" id="defcal" data-options='{"mode": "calbox"}'/>
  47. </div>
  48. <p>Using a calendar is as simple as setting the 'mode' option to "calbox".</p>
  49. <pre class="prettyprint">&lt;label for="mydate"&gt;Some Date&lt;/label&gt;
  50. &lt;input name="mydate" id="mydate" type="date" data-role="datebox"
  51. data-options='{"mode": "calbox"}'&gt;</pre>
  52. <h2>Changing the start of the week</h2>
  53. <div data-role="fieldcontain">
  54. <label for="calstartday">Some Date</label><input name="calstartday" type="date" data-role="datebox" id="calstartday" data-options='{"mode": "calbox", "calStartDay": 1}'/>
  55. </div>
  56. <p>To change the start of the week, set option 'calStartDay' to an integer 0-6, where 0=Sunday, 1=Monday...</p>
  57. <pre class="prettyprint">&lt;label for="mydate"&gt;Some Date&lt;/label&gt;
  58. &lt;input name="mydate" id="mydate" type="date" data-role="datebox"
  59. data-options='{"mode": "calbox", 'calStartDay': 1}'&gt;</pre>
  60. <h2>Selecting by week</h2>
  61. <div data-role="fieldcontain">
  62. <label for="calweekmode">Some Date</label><input name="calweekmode" type="date" data-role="datebox" id="calweekmode" data-options='{"mode": "calbox", "calWeekMode": true, "calWeekModeFirstDay": 1}'/>
  63. </div>
  64. <p>Using a calendar to select a specific day can be accomplished by setting option 'calWeekMode' to 'true' and 'calWeekModeFirstDay' to the day you wish to pick. For instance, to select by week using monday:</p>
  65. <pre class="prettyprint">&lt;label for="mydate"&gt;Some Date&lt;/label&gt;
  66. &lt;input name="mydate" id="mydate" type="date" data-role="datebox"
  67. data-options='{"mode": "calbox", "calWeekMode": true, "calWeekModeFirstDay": 1}'&gt;</pre>
  68. <h2>Showing a "today" button</h2>
  69. <div data-role="fieldcontain">
  70. <label for="caltodaybut">Some Date</label><input name="caltodaybut" type="date" data-role="datebox" id="caltodaybut" data-options='{"mode": "calbox", "calTodayButton": true}'/>
  71. </div>
  72. <p>To show a today button, set 'calTodayButton' to true</p>
  73. <pre class="prettyprint">&lt;label for="mydate"&gt;Some Date&lt;/label&gt;
  74. &lt;input name="mydate" id="mydate" type="date" data-role="datebox"
  75. data-options='{"mode": "calbox", 'calTodayButton': true}'&gt;</pre>
  76. <h2>Disabling manual input</h2>
  77. <div data-role="fieldcontain">
  78. <label for="caldisablemanualinput">Some Date</label><input name="caldisablemanualinput" type="date" data-role="datebox" id="caldisablemanualinput" data-options='{"mode": "calbox", "disableManualInput": true}'/>
  79. </div>
  80. <p>You're not able to type a value in the following input, you can set the value by the picker.</p>
  81. <pre class="prettyprint">&lt;label for="mydate"&gt;Some Date&lt;/label&gt;
  82. &lt;input name="mydate" id="mydate" type="date" data-role="datebox"
  83. data-options='{"mode": "calbox", "disableManualInput": true}'&gt;</pre>
  84. </nav>
  85. </div>
  86. </div>
  87. <div data-role="footer">
  88. <div data-role="controlgroup" data-type="horizontal">
  89. <a data-role="button" href="https://github.com/jtsage/jquery-mobile-datebox">GitHub Source</a><a data-role="button" rel='external' href="http://dev.jtsage.com/blog/">Blog</a><a data-role="button" href="mailto:jtsage+datebox@gmail.com">Contact</a><a data-role="button" href="http://jquerymobile.com/">jQueryMobile Homepage</a>
  90. </div>
  91. </div>
  92. </div>
  93. </html>